mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Made VertexDecl not appear as POD type to compiler.
This commit is contained in:
parent
484efd9b77
commit
b5627dc1b5
2 changed files with 8 additions and 0 deletions
|
@ -311,6 +311,8 @@ namespace bgfx
|
||||||
/// Vertex declaration.
|
/// Vertex declaration.
|
||||||
struct VertexDecl
|
struct VertexDecl
|
||||||
{
|
{
|
||||||
|
VertexDecl();
|
||||||
|
|
||||||
/// Start VertexDecl.
|
/// Start VertexDecl.
|
||||||
VertexDecl& begin(RendererType::Enum _renderer = RendererType::Null);
|
VertexDecl& begin(RendererType::Enum _renderer = RendererType::Null);
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,12 @@ namespace bgfx
|
||||||
va_end(argList);
|
va_end(argList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VertexDecl::VertexDecl()
|
||||||
|
{
|
||||||
|
// BK - struct need to have ctor to qualify as non-POD data.
|
||||||
|
// Need this to catch programming errors when serializing struct.
|
||||||
|
}
|
||||||
|
|
||||||
VertexDecl& VertexDecl::begin(RendererType::Enum _renderer)
|
VertexDecl& VertexDecl::begin(RendererType::Enum _renderer)
|
||||||
{
|
{
|
||||||
m_hash = _renderer; // use hash to store renderer type while building VertexDecl.
|
m_hash = _renderer; // use hash to store renderer type while building VertexDecl.
|
||||||
|
|
Loading…
Reference in a new issue