From: Esteban I. Ruiz Moreno Date: Tue, 30 Jul 2013 02:18:11 +0000 (-0300) Subject: Make bumpmapping compatible with irrlicht 1.8 X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=c6cb97e693722aee47aef03e4ea0788037a6a633;p=zefram%2Fminetest%2Fminetest_engine.git Make bumpmapping compatible with irrlicht 1.8 --- diff --git a/src/game.cpp b/src/game.cpp index 0c7d15d0..4f2d6650 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -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 } };