Function bgfx_sys::bgfx_create_texture_2d_scaled
source · pub unsafe extern "C" fn bgfx_create_texture_2d_scaled(
_ratio: bgfx_backbuffer_ratio_t,
_hasMips: bool,
_numLayers: u16,
_format: bgfx_texture_format_t,
_flags: u64
) -> bgfx_texture_handle_t
Expand description
Create texture with size based on back-buffer ratio. Texture will maintain ratio if back buffer resolution changes.
@param[in] _ratio Texture size in respect to back-buffer size. See: BackbufferRatio::Enum
.
@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.
@returns Texture handle.