Updated C99 API.

This commit is contained in:
Branimir Karadžić 2015-04-01 23:58:36 -07:00
parent ca41b8b774
commit 7ebc6e3cbb
2 changed files with 17 additions and 0 deletions

View file

@ -167,6 +167,12 @@ BGFX_HANDLE_T(bgfx_vertex_decl_handle);
#undef BGFX_HANDLE_T
/**
*
*/
typedef void (*bgfx_release_fn_t)(void* _ptr, void* _userData);
/**
*
*/
typedef struct bgfx_memory
{
@ -176,6 +182,7 @@ typedef struct bgfx_memory
} bgfx_memory_t;
/**
*
*/
typedef struct bgfx_transform
{
@ -634,6 +641,11 @@ BGFX_C_API const bgfx_memory_t* bgfx_copy(const void* _data, uint32_t _size);
*/
BGFX_C_API const bgfx_memory_t* bgfx_make_ref(const void* _data, uint32_t _size);
/**
*
*/
BGFX_C_API const bgfx_memory_t* bgfx_make_ref_release(const void* _data, uint32_t _size, bgfx_release_fn_t _releaseFn, void* _userData);
/**
* Set debug flags.
*

View file

@ -3096,6 +3096,11 @@ BGFX_C_API const bgfx_memory_t* bgfx_make_ref(const void* _data, uint32_t _size)
return (const bgfx_memory_t*)bgfx::makeRef(_data, _size);
}
BGFX_C_API const bgfx_memory_t* bgfx_make_ref_release(const void* _data, uint32_t _size, bgfx_release_fn_t _releaseFn, void* _userData)
{
return (const bgfx_memory_t*)bgfx::makeRef(_data, _size, _releaseFn, _userData);
}
BGFX_C_API void bgfx_set_debug(uint32_t _debug)
{
bgfx::setDebug(_debug);