Fix test compilation

dev-mp
Piotr Dziwinski 2014-06-26 22:36:57 +02:00
parent 092e7cc68d
commit 0fbc05b96c
3 changed files with 7 additions and 5 deletions

View File

@ -82,7 +82,9 @@ struct VertexCol
Math::Vector coord;
Color color;
explicit VertexCol(Math::Vector aCoord = Math::Vector(),
VertexCol() = default;
explicit VertexCol(Math::Vector aCoord,
Color aColor = Color())
: coord(aCoord), color(aColor) {}

View File

@ -78,7 +78,7 @@ void Render(Gfx::CGLDevice *device)
worldMat.LoadIdentity();
device->SetTransform(Gfx::TRANSFORM_WORLD, worldMat);
Gfx::VertexCol line[2] = Gfx::VertexCol{ Gfx::VertexCol() };
Gfx::VertexCol line[2] = {};
for (int x = -40; x <= 40; ++x)
{
@ -103,7 +103,7 @@ void Render(Gfx::CGLDevice *device)
}
Gfx::VertexCol quad[6] = Gfx::VertexCol{ Gfx::VertexCol() };
Gfx::VertexCol quad[6] = {};
quad[0].coord = Math::Vector(-1.0f, -1.0f, 0.0f);
quad[1].coord = Math::Vector( 1.0f, -1.0f, 0.0f);

View File

@ -73,7 +73,7 @@ void Render(Gfx::CGLDevice *device)
worldMat.LoadIdentity();
device->SetTransform(Gfx::TRANSFORM_WORLD, worldMat);
Gfx::VertexCol line[2] = Gfx::VertexCol{ Gfx::VertexCol() };
Gfx::VertexCol line[2] = {};
for (int x = -40; x <= 40; ++x)
{
@ -98,7 +98,7 @@ void Render(Gfx::CGLDevice *device)
}
Gfx::VertexCol quad[6] = Gfx::VertexCol{ Gfx::VertexCol() };
Gfx::VertexCol quad[6] = {};
for (int i = 0; i < 6; ++i)
quad[i].color = Gfx::Color(1.0f, 1.0f, 0.0f);