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

@ -22,7 +22,12 @@ int _main_(int _argc, char** _argv)
(void)_argc; (void)_argc;
(void)_argv; (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); bgfx_reset(width, height, reset);
// Enable debug text. // 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 * specified, library uses default CRT allocator. The library assumes
* custom allocator is thread safe. * 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. * 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) ); 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) return bgfx::init(bgfx::RendererType::Enum(_type)
, BGFX_PCI_ID_NONE , _vendorId
, 0 , _deviceId
, reinterpret_cast<bgfx::CallbackI*>(_callback) , reinterpret_cast<bgfx::CallbackI*>(_callback)
, reinterpret_cast<bx::ReallocatorI*>(_allocator) , reinterpret_cast<bx::ReallocatorI*>(_allocator)
); );