Updated C99 API.

This commit is contained in:
Branimir Karadžić 2015-03-27 22:09:10 -07:00
parent e3974036c7
commit 4b18babb62
3 changed files with 13 additions and 8 deletions

View file

@ -15,14 +15,19 @@ uint16_t uint16_max(uint16_t _a, uint16_t _b)
int _main_(int _argc, char** _argv)
{
uint32_t width = 1280;
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
(void)_argc;
(void)_argv;
bgfx_init(BGFX_RENDERER_TYPE_COUNT, NULL, NULL);
bgfx_init(BGFX_RENDERER_TYPE_COUNT
, BGFX_PCI_ID_NONE
, 0
, NULL
, NULL
);
bgfx_reset(width, height, reset);
// Enable debug text.

View file

@ -573,7 +573,7 @@ BGFX_C_API const char* bgfx_get_renderer_name(bgfx_renderer_type_t _type);
* specified, library uses default CRT allocator. The library assumes
* custom allocator is thread safe.
*/
BGFX_C_API void bgfx_init(bgfx_renderer_type_t _type, bgfx_callback_interface_t* _callback, bgfx_reallocator_interface_t* _allocator);
BGFX_C_API void bgfx_init(bgfx_renderer_type_t _type, uint16_t _vendorId, uint16_t _deviceId, bgfx_callback_interface_t* _callback, bgfx_reallocator_interface_t* _allocator);
/**
* Shutdown bgfx library.

View file

@ -3018,11 +3018,11 @@ BGFX_C_API const char* bgfx_get_renderer_name(bgfx_renderer_type_t _type)
return bgfx::getRendererName(bgfx::RendererType::Enum(_type) );
}
BGFX_C_API void bgfx_init(bgfx_renderer_type_t _type, struct bgfx_callback_interface* _callback, struct bgfx_reallocator_interface* _allocator)
BGFX_C_API void bgfx_init(bgfx_renderer_type_t _type, uint16_t _vendorId, uint16_t _deviceId, bgfx_callback_interface_t* _callback, bgfx_reallocator_interface_t* _allocator)
{
return bgfx::init(bgfx::RendererType::Enum(_type)
, BGFX_PCI_ID_NONE
, 0
, _vendorId
, _deviceId
, reinterpret_cast<bgfx::CallbackI*>(_callback)
, reinterpret_cast<bx::ReallocatorI*>(_allocator)
);