bgfx_vertex_layout_add

Add attribute to VertexLayout. Remarks: Must be called between begin/end.

  1. bgfx_vertex_layout_t* bgfx_vertex_layout_add(bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, byte _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt)
    version(BindBgfx_Static)
    extern (C) @nogc nothrow
    bgfx_vertex_layout_add
  2. da_bgfx_vertex_layout_add bgfx_vertex_layout_add;

Parameters

_attrib bgfx_attrib_t

Attribute semantics. See: bgfx::Attrib

_num byte

Number of elements 1, 2, 3 or 4.

_type bgfx_attrib_type_t

Element type.

_normalized bool

When using fixed point AttribType (f.e. Uint8) value will be normalized for vertex shader usage. When normalized is set to true, AttribType::Uint8 value in range 0-255 will be in range 0.0-1.0 in vertex shader.

_asInt bool

Packaging rule for vertexPack, vertexUnpack, and vertexConvert for AttribType::Uint8 and AttribType::Int16. Unpacking code must be implemented inside vertex shader.

Meta