Skip to content

Commit

Permalink
Make bumpmapping compatible with irrlicht 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
EXio4 authored and PilzAdam committed Jul 31, 2013
1 parent 251e3e0 commit c6cb97e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game.cpp
Expand Up @@ -807,7 +807,12 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter

// 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
}
};

Expand Down

0 comments on commit c6cb97e

Please sign in to comment.