Skip to content

Commit

Permalink
Made vertex decl begin accept RenderType::Count as default.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Mar 18, 2015
1 parent b2da0cc commit 5802af7
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/vertexdecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,21 @@ namespace bgfx

static const uint8_t (*s_attribTypeSize[])[AttribType::Count][4] =
{
#if BGFX_CONFIG_RENDERER_DIRECT3D9
&s_attribTypeSizeDx9,
#elif BGFX_CONFIG_RENDERER_DIRECT3D11 || BGFX_CONFIG_RENDERER_DIRECT3D12
&s_attribTypeSizeDx1x,
#elif BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES || BGFX_CONFIG_RENDERER_VULKAN
&s_attribTypeSizeGl,
#else
&s_attribTypeSizeDx9,
#endif // BGFX_CONFIG_RENDERER_
&s_attribTypeSizeDx9, // Null
&s_attribTypeSizeDx9, // Direct3D9
&s_attribTypeSizeDx1x, // Direct3D11
&s_attribTypeSizeDx1x, // Direct3D12
&s_attribTypeSizeGl, // OpenGLES
&s_attribTypeSizeGl, // OpenGL
&s_attribTypeSizeGl, // Vulkan
&s_attribTypeSizeDx9, // Count
};
BX_STATIC_ASSERT(BX_COUNTOF(s_attribTypeSize) == bgfx::RendererType::Count);
BX_STATIC_ASSERT(BX_COUNTOF(s_attribTypeSize) == RendererType::Count+1);

void initAttribTypeSizeTable(RendererType::Enum _type)
{
s_attribTypeSize[0] = s_attribTypeSize[_type];
s_attribTypeSize[0] = s_attribTypeSize[_type];
s_attribTypeSize[RendererType::Count] = s_attribTypeSize[_type];
}

void dbgPrintfVargs(const char* _format, va_list _argList)
Expand Down

0 comments on commit 5802af7

Please sign in to comment.