summaryrefslogtreecommitdiffstats
path: root/src/graphics/common/device.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-07-04 00:04:53 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-07-04 00:04:53 +0200
commitf95df35dc58e01b99ffddfc4ad394feaa4460b09 (patch)
tree4e3afe06c73adc767e308991ce4192983fd7b72b /src/graphics/common/device.cpp
parentd9c5a439d09211ec210195709d275596c6c3c9ba (diff)
downloadcolobot-f95df35dc58e01b99ffddfc4ad394feaa4460b09.tar.gz
colobot-f95df35dc58e01b99ffddfc4ad394feaa4460b09.tar.bz2
colobot-f95df35dc58e01b99ffddfc4ad394feaa4460b09.zip
Multitexturing support
- added CImage class for loading/saving images and a simple test for it - added libpng library to build - added Gfx::Texture struct - updated the Gfx::CDevice interface to include new features - implemented the new features in Gfx::CGLDevice
Diffstat (limited to 'src/graphics/common/device.cpp')
-rw-r--r--src/graphics/common/device.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/graphics/common/device.cpp b/src/graphics/common/device.cpp
index fcd4318..bb51699 100644
--- a/src/graphics/common/device.cpp
+++ b/src/graphics/common/device.cpp
@@ -31,3 +31,20 @@ void Gfx::DeviceConfig::LoadDefault()
doubleBuf = true;
noFrame = false;
}
+
+void Gfx::TextureParams::LoadDefault()
+{
+ minFilter = Gfx::TEX_MIN_FILTER_NEAREST;
+ magFilter = Gfx::TEX_MAG_FILTER_NEAREST;
+
+ wrapS = Gfx::TEX_WRAP_REPEAT;
+ wrapT = Gfx::TEX_WRAP_REPEAT;
+
+ colorOperation = Gfx::TEX_MIX_OPER_MODULATE;
+ colorArg1 = Gfx::TEX_MIX_ARG_CURRENT;
+ colorArg2 = Gfx::TEX_MIX_ARG_TEXTURE;
+
+ alphaOperation = Gfx::TEX_MIX_OPER_MODULATE;
+ alphaArg1 = Gfx::TEX_MIX_ARG_CURRENT;
+ alphaArg2 = Gfx::TEX_MIX_ARG_TEXTURE;
+}