Cleanup.
This commit is contained in:
parent
6ba3a60c1a
commit
db0934f419
48
src/bgfx.cpp
48
src/bgfx.cpp
@ -1332,42 +1332,22 @@ namespace bgfx
|
||||
typedef RendererContextI* (*RendererCreateFn)();
|
||||
typedef void (*RendererDestroyFn)();
|
||||
|
||||
namespace noop
|
||||
{
|
||||
extern RendererContextI* rendererCreate();
|
||||
extern void rendererDestroy();
|
||||
} // namespace noop
|
||||
|
||||
namespace gl
|
||||
{
|
||||
extern RendererContextI* rendererCreate();
|
||||
extern void rendererDestroy();
|
||||
} // namespace gl
|
||||
|
||||
namespace d3d9
|
||||
{
|
||||
extern RendererContextI* rendererCreate();
|
||||
extern void rendererDestroy();
|
||||
} // namespace d3d9
|
||||
|
||||
namespace d3d11
|
||||
{
|
||||
extern RendererContextI* rendererCreate();
|
||||
extern void rendererDestroy();
|
||||
} // namespace d3d11
|
||||
|
||||
namespace d3d12
|
||||
{
|
||||
extern RendererContextI* rendererCreate();
|
||||
extern void rendererDestroy();
|
||||
} // namespace d3d12
|
||||
|
||||
namespace vk
|
||||
{
|
||||
extern RendererContextI* rendererCreate();
|
||||
extern void rendererDestroy();
|
||||
#define BGFX_RENDERER_CONTEXT(_namespace) \
|
||||
namespace _namespace \
|
||||
{ \
|
||||
extern RendererContextI* rendererCreate(); \
|
||||
extern void rendererDestroy(); \
|
||||
}
|
||||
|
||||
BGFX_RENDERER_CONTEXT(noop);
|
||||
BGFX_RENDERER_CONTEXT(d3d9);
|
||||
BGFX_RENDERER_CONTEXT(d3d11);
|
||||
BGFX_RENDERER_CONTEXT(d3d12);
|
||||
BGFX_RENDERER_CONTEXT(gl);
|
||||
BGFX_RENDERER_CONTEXT(vk);
|
||||
|
||||
#undef BGFX_RENDERER_CONTEXT
|
||||
|
||||
struct RendererCreator
|
||||
{
|
||||
RendererCreateFn createFn;
|
||||
|
Loading…
Reference in New Issue
Block a user