Trait maia_wasm::render::TextureInternalFormat

source ·
pub trait TextureInternalFormat {
    type T: ArrayView;

    const INTERNAL_FORMAT: i32;
    const FORMAT: u32;
}
Expand description

WebGL2 texture internal format.

This trait gives idiomatic Rust usage of WebGL2 texture formats. The trait gives the WebGL2 constants that list the corresponding internal format and format, and a Rust type that can be converted to a JS type, using the ArrayView trait.

Required Associated Types§

source

type T: ArrayView

Native Rust type corresponding to this format.

Required Associated Constants§

source

const INTERNAL_FORMAT: i32

WebGL2 constant that indicates the internal format.

source

const FORMAT: u32

WebGL2 constant that indicates the format.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl TextureInternalFormat for LuminanceAlpha

source§

const INTERNAL_FORMAT: i32 = 6_410i32

source§

const FORMAT: u32 = 6_410u32

§

type T = u8

source§

impl TextureInternalFormat for R16f

source§

const INTERNAL_FORMAT: i32 = 33_325i32

source§

const FORMAT: u32 = 6_403u32

§

type T = f32

source§

impl TextureInternalFormat for Rgb

source§

const INTERNAL_FORMAT: i32 = 6_407i32

source§

const FORMAT: u32 = 6_407u32

§

type T = u8

source§

impl TextureInternalFormat for Rgba

source§

const INTERNAL_FORMAT: i32 = 6_408i32

source§

const FORMAT: u32 = 6_408u32

§

type T = u8