aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2016-02-14 09:00:34 +0100
committerest31 <MTest31@outlook.com>2016-02-14 10:01:30 +0100
commitcfc8e447595db0351754a2eae29a18918742d29d (patch)
tree58e0dbd77fc026ac0ad786b50628aff3e5d33220 /src
parentc17c40a0f5f4276c576400259e691f1273370193 (diff)
downloadminetest-cfc8e447595db0351754a2eae29a18918742d29d.tar.gz
minetest-cfc8e447595db0351754a2eae29a18918742d29d.tar.bz2
minetest-cfc8e447595db0351754a2eae29a18918742d29d.zip
Use proper variable types for uniform sampler layers
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index cae468d4c..44b35ff5b 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -907,15 +907,18 @@ public:
services->setPixelShaderConstant("yawVec", (irr::f32 *)&minimap_yaw_vec, 3);
// Uniform sampler layers
- int layer0 = 0;
- int layer1 = 1;
- int layer2 = 2;
// before 1.8 there isn't a "integer interface", only float
#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
+ f32 layer0 = 0;
+ f32 layer1 = 1;
+ f32 layer2 = 2;
services->setPixelShaderConstant("baseTexture" , (irr::f32 *)&layer0, 1);
services->setPixelShaderConstant("normalTexture" , (irr::f32 *)&layer1, 1);
services->setPixelShaderConstant("textureFlags" , (irr::f32 *)&layer2, 1);
#else
+ s32 layer0 = 0;
+ s32 layer1 = 1;
+ s32 layer2 = 2;
services->setPixelShaderConstant("baseTexture" , (irr::s32 *)&layer0, 1);
services->setPixelShaderConstant("normalTexture" , (irr::s32 *)&layer1, 1);
services->setPixelShaderConstant("textureFlags" , (irr::s32 *)&layer2, 1);