From 68e43b7b015701d3c9f0c81d4db645646842a79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 26 Jun 2018 09:54:17 -0700 Subject: [PATCH] Cleanup. --- include/bgfx/c99/bgfx.h | 2 +- include/bgfx/c99/platform.h | 2 ++ include/bgfx/defines.h | 2 +- src/bgfx.cpp | 7 +++++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/bgfx/c99/bgfx.h b/include/bgfx/c99/bgfx.h index 09183d4ab..2bc54ac5f 100644 --- a/include/bgfx/c99/bgfx.h +++ b/include/bgfx/c99/bgfx.h @@ -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); diff --git a/include/bgfx/c99/platform.h b/include/bgfx/c99/platform.h index 1358f7439..de7de5564 100644 --- a/include/bgfx/c99/platform.h +++ b/include/bgfx/c99/platform.h @@ -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); diff --git a/include/bgfx/defines.h b/include/bgfx/defines.h index 3e0670be7..77d9964e7 100644 --- a/include/bgfx/defines.h +++ b/include/bgfx/defines.h @@ -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. diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 90d674003..5fef74b30 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -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) \