summaryrefslogtreecommitdiffstats
path: root/src/graphics/opengl/test/model_test.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-08-13 23:13:10 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-08-13 23:13:10 +0200
commit8b2bca72dd71a1c23db51269a147443c80758f10 (patch)
tree66d5aea574f5a4530492b6ab69956003427df98b /src/graphics/opengl/test/model_test.cpp
parentdc3cadd309a1ac1eb4921de69fed6037881b0b91 (diff)
parent5b45911856442ee7cbd451125c47fd13f21db58e (diff)
downloadcolobot-8b2bca72dd71a1c23db51269a147443c80758f10.tar.gz
colobot-8b2bca72dd71a1c23db51269a147443c80758f10.tar.bz2
colobot-8b2bca72dd71a1c23db51269a147443c80758f10.zip
Merge branch 'dev-graphics' into dev
Documentation, rendering functions & fixes
Diffstat (limited to 'src/graphics/opengl/test/model_test.cpp')
-rw-r--r--src/graphics/opengl/test/model_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics/opengl/test/model_test.cpp b/src/graphics/opengl/test/model_test.cpp
index 3e8efe6..e951e6e 100644
--- a/src/graphics/opengl/test/model_test.cpp
+++ b/src/graphics/opengl/test/model_test.cpp
@@ -54,7 +54,7 @@ void LoadTexture(Gfx::CGLDevice *device, const std::string &name)
Gfx::Texture tex = GetTexture(name);
- if (tex.valid)
+ if (tex.Valid())
return;
CImage img;
@@ -84,7 +84,7 @@ void Init(Gfx::CGLDevice *device, Gfx::CModelFile *model)
{
std::vector<Gfx::ModelTriangle> &triangles = model->GetTriangles();
- for (int i = 0; i < (int) triangles.size(); ++i)
+ for (int i = 0; i < static_cast<int>( triangles.size() ); ++i)
{
LoadTexture(device, triangles[i].tex1Name);
LoadTexture(device, triangles[i].tex2Name);
@@ -131,7 +131,7 @@ void Render(Gfx::CGLDevice *device, Gfx::CModelFile *modelFile)
Gfx::VertexTex2 tri[3];
- for (int i = 0; i < (int) triangles.size(); ++i)
+ for (int i = 0; i < static_cast<int>( triangles.size() ); ++i)
{
device->SetTexture(0, GetTexture(triangles[i].tex1Name));
device->SetTexture(1, GetTexture(triangles[i].tex2Name));
@@ -334,7 +334,7 @@ int main(int argc, char *argv[])
SDL_WM_SetCaption("Model Test", "Model Test");
- Gfx::CGLDevice *device = new Gfx::CGLDevice();
+ Gfx::CGLDevice *device = new Gfx::CGLDevice(Gfx::GLDeviceConfig());
device->Create();
Init(device, modelFile);