Added setTexture view API. (#3728)

This commit is contained in:
Branimir Karadžić
2026-06-06 10:34:02 -07:00
committed by GitHub
parent 69615a9a51
commit 11151de78d
25 changed files with 909 additions and 139 deletions

View File

@@ -1,7 +1,7 @@
-- vim: syntax=lua
-- bgfx interface
version(143)
version(144)
typedef "bool"
typedef "char"
@@ -2617,6 +2617,24 @@ func.Encoder.setTexture { section = "Draw/Textures" }
--- - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
--- sampling.
--- Set texture stage for draw primitive, selecting a sub-range of the
--- texture's array layers and mip levels.
func.Encoder.setTexture { cname = "set_texture_view", section = "Draw/Textures" }
"void"
.stage "uint8_t" --- Texture unit.
.sampler "UniformHandle" --- Program sampler.
.handle "TextureHandle" --- Texture handle.
.firstLayer "uint16_t" --- First array layer.
.numLayers "uint16_t" --- Number of array layers.
.firstMip "uint8_t" --- First (most detailed) mip level.
.numMips "uint8_t" --- Number of mip levels.
.flags "uint32_t" --- Texture sampling mode. Default value UINT32_MAX uses
{ default = UINT32_MAX } --- texture sampling settings from the texture.
--- - `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.
--- Submit an empty primitive for rendering. Uniforms and draw state
--- will be applied but no geometry will be submitted. Useful in cases
--- when no other draw/compute primitive is submitted to view, but it's
@@ -3220,6 +3238,24 @@ func.setTexture { section = "Draw/Textures" }
--- - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
--- sampling.
--- Set texture stage for draw primitive, selecting a sub-range of the
--- texture's array layers and mip levels.
func.setTexture { cname = "set_texture_view", section = "Draw/Textures" }
"void"
.stage "uint8_t" --- Texture unit.
.sampler "UniformHandle" --- Program sampler.
.handle "TextureHandle" --- Texture handle.
.firstLayer "uint16_t" --- First array layer.
.numLayers "uint16_t" --- Number of array layers.
.firstMip "uint8_t" --- First (most detailed) mip level.
.numMips "uint8_t" --- Number of mip levels.
.flags "uint32_t" --- Texture sampling mode. Default value UINT32_MAX uses
{ default = UINT32_MAX } --- texture sampling settings from the texture.
--- - `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.
--- Submit an empty primitive for rendering. Uniforms and draw state
--- will be applied but no geometry will be submitted.
---