Struct glsmrs::texture::TextureSpec
source · [−]pub struct TextureSpec {
pub color_format: ColorFormat,
pub dimensions: [u32; 2],
pub interpolation_min: InterpolationMin,
pub interpolation_mag: InterpolationMag,
pub wrap_t: WrapT,
pub wrap_s: WrapS,
}
Fields
color_format: ColorFormat
dimensions: [u32; 2]
interpolation_min: InterpolationMin
interpolation_mag: InterpolationMag
wrap_t: WrapT
wrap_s: WrapS
Implementations
sourceimpl TextureSpec
impl TextureSpec
pub fn new(color_format: ColorFormat, dimensions: [u32; 2]) -> Self
pub fn pixel(color_format: ColorFormat, dimensions: [u32; 2]) -> Self
pub fn depth(dimensions: [u32; 2]) -> Self
pub fn wrap_t(self, wrap: WrapT) -> Self
pub fn wrap_s(self, wrap: WrapS) -> Self
pub fn upload_u8(
&self,
ctx: &Ctx,
data: &[u8]
) -> Result<UploadedTexture, String>
pub fn upload_rgba(
&self,
ctx: &Ctx,
data: &[[f32; 4]]
) -> Result<UploadedTexture, String>
pub fn upload_f32(
&self,
ctx: &Ctx,
data: &[f32]
) -> Result<UploadedTexture, String>
pub fn upload(
&self,
ctx: &Ctx,
internal_format: InternalFormat,
data: Option<&Object>
) -> Result<UploadedTexture, String>
Auto Trait Implementations
impl RefUnwindSafe for TextureSpec
impl Send for TextureSpec
impl Sync for TextureSpec
impl Unpin for TextureSpec
impl UnwindSafe for TextureSpec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more