bgfx_create_texture_2d_scaled

Create texture with size based on backbuffer ratio. Texture will maintain ratio if back buffer resolution changes.

  1. bgfx_texture_handle_t bgfx_create_texture_2d_scaled(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags)
    version(BindBgfx_Static)
    extern (C) @nogc nothrow
    bgfx_create_texture_2d_scaled
  2. da_bgfx_create_texture_2d_scaled bgfx_create_texture_2d_scaled;

Parameters

_ratio bgfx_backbuffer_ratio_t

Texture size in respect to back-buffer size. See: BackbufferRatio::Enum.

_hasMips bool

Indicates that texture contains full mip-map chain.

_numLayers ushort

Number of layers in texture array. Must be 1 if caps BGFX_CAPS_TEXTURE_2D_ARRAY flag is not set.

_format bgfx_texture_format_t

Texture format. See: TextureFormat::Enum.

_flags ulong

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.

Meta