Function bgfx_sys::bgfx_create_texture_2d
source · pub unsafe extern "C" fn bgfx_create_texture_2d(
_width: u16,
_height: u16,
_hasMips: bool,
_numLayers: u16,
_format: bgfx_texture_format_t,
_flags: u64,
_mem: *const bgfx_memory_t
) -> bgfx_texture_handle_t
Expand description
Create 2D texture.
@param[in] _width Width.
@param[in] _height Height.
@param[in] _hasMips Indicates that texture contains full mip-map chain.
@param[in] _numLayers Number of layers in texture array. Must be 1 if caps
BGFX_CAPS_TEXTURE_2D_ARRAY
flag is not set.
@param[in] _format Texture format. See: TextureFormat::Enum
.
@param[in] _flags Texture creation (see BGFX_TEXTURE_*
.), and sampler (see BGFX_SAMPLER_*
)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]
- Mirror or clamp to edge wrap mode.BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]
- Point or anisotropic sampling. @param[in] _mem Texture data. If_mem
is non-NULL, created texture will be immutable. If_mem
is NULL content of the texture is uninitialized. When_numLayers
is more than 1, expected memory layout is texture and all mips together for each array element.
@returns Texture handle.