This commit is contained in:
Branimir Karadžić 2018-06-26 09:54:17 -07:00
parent 811d60a2ab
commit 68e43b7b01
4 changed files with 9 additions and 4 deletions

View File

@ -657,7 +657,7 @@ BGFX_C_API void bgfx_vertex_decl_begin(bgfx_vertex_decl_t* _decl, bgfx_renderer_
BGFX_C_API void bgfx_vertex_decl_add(bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
/**/
BGFX_C_API void bgfx_vertex_decl_decode(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t *_num, bgfx_attrib_type_t *_type, bool *_normalized, bool *_asInt);
BGFX_C_API void bgfx_vertex_decl_decode(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
/**/
BGFX_C_API bool bgfx_vertex_decl_has(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib);

View File

@ -73,6 +73,8 @@ typedef struct bgfx_interface_vtbl
uintptr_t (*override_internal_texture)(bgfx_texture_handle_t _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags);
void (*vertex_decl_begin)(bgfx_vertex_decl_t* _decl, bgfx_renderer_type_t _renderer);
void (*vertex_decl_add)(bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
void (*vertex_decl_decode)(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
bool (*vertex_decl_has)(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib);
void (*vertex_decl_skip)(bgfx_vertex_decl_t* _decl, uint8_t _num);
void (*vertex_decl_end)(bgfx_vertex_decl_t* _decl);
void (*vertex_pack)(const float _input[4], bool _inputNormalized, bgfx_attrib_t _attr, const bgfx_vertex_decl_t* _decl, void* _data, uint32_t _index);

View File

@ -6,7 +6,7 @@
#ifndef BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_API_VERSION UINT32_C(74)
#define BGFX_API_VERSION UINT32_C(75)
/// Color RGB/alpha/depth write. When it's not specified write will be disabled.
#define BGFX_STATE_WRITE_R UINT64_C(0x0000000000000001) //!< Enable R write.

View File

@ -4741,11 +4741,12 @@ BGFX_C_API void bgfx_vertex_decl_add(bgfx_vertex_decl_t* _decl, bgfx_attrib_t _a
);
}
BGFX_C_API void bgfx_vertex_decl_decode(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t *_num, bgfx_attrib_type_t *_type, bool *_normalized, bool *_asInt)
BGFX_C_API void bgfx_vertex_decl_decode(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt)
{
bgfx::AttribType::Enum type;
const bgfx::VertexDecl* decl = (const bgfx::VertexDecl*)_decl;
decl->decode(bgfx::Attrib::Enum(_attrib)
decl->decode(
bgfx::Attrib::Enum(_attrib)
, *_num
, type
, *_normalized
@ -5803,6 +5804,8 @@ BGFX_C_API bgfx_interface_vtbl_t* bgfx_get_interface(uint32_t _version)
BGFX_IMPORT_FUNC(override_internal_texture) \
BGFX_IMPORT_FUNC(vertex_decl_begin) \
BGFX_IMPORT_FUNC(vertex_decl_add) \
BGFX_IMPORT_FUNC(vertex_decl_decode) \
BGFX_IMPORT_FUNC(vertex_decl_has) \
BGFX_IMPORT_FUNC(vertex_decl_skip) \
BGFX_IMPORT_FUNC(vertex_decl_end) \
BGFX_IMPORT_FUNC(vertex_pack) \