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