Make bumpmapping compatible with irrlicht 1.8
authorEsteban I. Ruiz Moreno <exio4.com@gmail.com>
Tue, 30 Jul 2013 02:18:11 +0000 (23:18 -0300)
committerPilzAdam <pilzadam@minetest.net>
Wed, 31 Jul 2013 17:35:28 +0000 (19:35 +0200)
src/game.cpp

index 0c7d15d0cde86f8a50e9333fd94d4f04ea68f095..4f2d6650d4cecd146dc79ce3a9a7ce514b52c846 100644 (file)
@@ -807,7 +807,12 @@ public:
                
                // Normal map texture layer
                int layer = 1;
+               // before 1.8 there isn't a "integer interface", only float
+#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
                services->setPixelShaderConstant("normalTexture" , (irr::f32*)&layer, 1);
+#else
+               services->setPixelShaderConstant("normalTexture" , (irr::s32*)&layer, 1);
+#endif
        }
 };