This commit is contained in:
Branimir Karadžić 2015-03-22 10:18:47 -07:00
parent 6ba3a60c1a
commit db0934f419

View File

@ -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
{ {