diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-25 20:27:13 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-25 20:27:13 +0200 |
commit | bc1c9b5284c10d8aafc04bcd6c3597b3626a782f (patch) | |
tree | 88f432699953fba513dc78155252ce20f83d5b05 /src/graphics/opengl/test | |
parent | 9cd28e26e90ecbce239991e054293f748895fb98 (diff) | |
download | colobot-bc1c9b5284c10d8aafc04bcd6c3597b3626a782f.tar.gz colobot-bc1c9b5284c10d8aafc04bcd6c3597b3626a782f.tar.bz2 colobot-bc1c9b5284c10d8aafc04bcd6c3597b3626a782f.zip |
Fixed bug in texturing
Diffstat (limited to 'src/graphics/opengl/test')
-rw-r--r-- | src/graphics/opengl/test/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/graphics/opengl/test/texture_test.cpp | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/graphics/opengl/test/CMakeLists.txt b/src/graphics/opengl/test/CMakeLists.txt index 58c4714..f49fbac 100644 --- a/src/graphics/opengl/test/CMakeLists.txt +++ b/src/graphics/opengl/test/CMakeLists.txt @@ -30,7 +30,6 @@ configure_file(../../../common/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/common set(TEXTURE_SOURCES ../gldevice.cpp -../../common/device.cpp ../../../common/logger.cpp ../../../common/image.cpp texture_test.cpp @@ -38,7 +37,6 @@ texture_test.cpp set(MODEL_SOURCES ../gldevice.cpp -../../common/device.cpp ../../common/modelfile.cpp ../../../common/logger.cpp ../../../common/image.cpp @@ -50,7 +48,6 @@ model_test.cpp set(TRANSFORM_SOURCES ../gldevice.cpp -../../common/device.cpp ../../../common/logger.cpp ../../../common/image.cpp ../../../common/iman.cpp diff --git a/src/graphics/opengl/test/texture_test.cpp b/src/graphics/opengl/test/texture_test.cpp index aa9817e..c3c568b 100644 --- a/src/graphics/opengl/test/texture_test.cpp +++ b/src/graphics/opengl/test/texture_test.cpp @@ -108,6 +108,16 @@ void Render(Gfx::CGLDevice *device) device->SetTextureEnabled(0, true); device->SetTextureEnabled(1, true); + tex1StageParams.colorOperation = Gfx::TEX_MIX_OPER_DEFAULT; + tex1StageParams.alphaOperation = Gfx::TEX_MIX_OPER_DEFAULT; + device->SetTextureStageParams(0, tex1StageParams); + + tex2StageParams.colorOperation = Gfx::TEX_MIX_OPER_ADD; + tex2StageParams.colorArg1 = Gfx::TEX_MIX_ARG_COMPUTED_COLOR; + tex2StageParams.colorArg2 = Gfx::TEX_MIX_ARG_TEXTURE; + tex2StageParams.alphaOperation = Gfx::TEX_MIX_OPER_DEFAULT; + device->SetTextureStageParams(1, tex2StageParams); + device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLES, quad, 6); device->EndScene(); |