Commit 4857101c authored by Jan Möbius's avatar Jan Möbius
Browse files

Get rid of compiler warning due to missing braces when initializing union.

refs #901



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14720 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 52dfc8a7
......@@ -145,15 +145,15 @@ DrawMeshT<Mesh>::DrawMeshT(Mesh& _mesh)
vertexDeclVCol_ = new VertexDeclaration;
vertexDeclFCol_ = new VertexDeclaration;
VertexElement elemArrayV[] = { {GL_FLOAT, 3, VERTEX_USAGE_POSITION, 0, 0},
{GL_FLOAT, 2, VERTEX_USAGE_TEXCOORD, 0, 0},
{GL_FLOAT, 3, VERTEX_USAGE_NORMAL, 0, 0},
{GL_UNSIGNED_BYTE, 4, VERTEX_USAGE_COLOR, 0, 0}};
VertexElement elemArrayF[] = { {GL_FLOAT, 3, VERTEX_USAGE_POSITION, 0, 0},
{GL_FLOAT, 2, VERTEX_USAGE_TEXCOORD, 0, 12},
{GL_FLOAT, 3, VERTEX_USAGE_NORMAL, 0, 20},
{GL_UNSIGNED_BYTE, 4, VERTEX_USAGE_COLOR, 0, 36}};
VertexElement elemArrayV[] = { {GL_FLOAT, 3, VERTEX_USAGE_POSITION, 0, {0} },
{GL_FLOAT, 2, VERTEX_USAGE_TEXCOORD, 0, {0} },
{GL_FLOAT, 3, VERTEX_USAGE_NORMAL, 0, {0} },
{GL_UNSIGNED_BYTE, 4, VERTEX_USAGE_COLOR, 0, {0} } };
VertexElement elemArrayF[] = { {GL_FLOAT, 3, VERTEX_USAGE_POSITION, 0, {0} },
{GL_FLOAT, 2, VERTEX_USAGE_TEXCOORD, 0, {12} },
{GL_FLOAT, 3, VERTEX_USAGE_NORMAL, 0, {20} },
{GL_UNSIGNED_BYTE, 4, VERTEX_USAGE_COLOR, 0, {36} } };
vertexDeclVCol_->addElements(4, elemArrayV);
vertexDeclFCol_->addElements(4, elemArrayF);
......
......@@ -114,21 +114,21 @@ struct VertexElement
*
* You would create the following VertexElements:
* \code
* VertexElement elemArray[] = { {GL_FLOAT, 4, VERTEX_USAGE_POSITION, 0, 0},
* {GL_FLOAT, 3, VERTEX_USAGE_NORMAL, 0, 0},
* {GL_FLOAT, 2, VERTEX_USAGE_TEXCOORD, 0, 0},
* {GL_UNSIGNED_BYTE, 4, VERTEX_USAGE_COLOR, 0, 0},
* {GL_FLOAT, 4, VERTEX_USAGE_SHADER_INPUT, "inTangent", 0},
* {GL_FLOAT, 2, VERTEX_USAGE_SHADER_INPUT, "inTexcoord2", 0}
* VertexElement elemArray[] = { {GL_FLOAT, 4, VERTEX_USAGE_POSITION, 0, {0} },
* {GL_FLOAT, 3, VERTEX_USAGE_NORMAL, 0, {0} },
* {GL_FLOAT, 2, VERTEX_USAGE_TEXCOORD, 0, {0} },
* {GL_UNSIGNED_BYTE, 4, VERTEX_USAGE_COLOR, 0, {0} },
* {GL_FLOAT, 4, VERTEX_USAGE_SHADER_INPUT, "inTangent", {0} },
* {GL_FLOAT, 2, VERTEX_USAGE_SHADER_INPUT, "inTexcoord2", {0}}
* };
* \endcode
*
* equivalent to
* \code
* VertexElement elemArray[] = { {GL_FLOAT, 4, VERTEX_USAGE_POSITION, 0, 0},
* {GL_FLOAT, 3, VERTEX_USAGE_NORMAL, 0, 4*4},
* {GL_FLOAT, 2, VERTEX_USAGE_TEXCOORD, 0, 4*4 + 4*3},
* {GL_UNSIGNED_BYTE, 4, VERTEX_USAGE_COLOR, 0, 4*4 + 4*3 + 4*2},
* VertexElement elemArray[] = { {GL_FLOAT, 4, VERTEX_USAGE_POSITION, 0, {0} },
* {GL_FLOAT, 3, VERTEX_USAGE_NORMAL, 0, {4*4} },
* {GL_FLOAT, 2, VERTEX_USAGE_TEXCOORD, 0, {4*4 + 4*3} },
* {GL_UNSIGNED_BYTE, 4, VERTEX_USAGE_COLOR, 0, {4*4 + 4*3 + 4*2} },
* ..
* };
* \endcode
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment