Skip to content

Commit c6cb97e

Browse files
EXio4PilzAdam
authored andcommitted
Make bumpmapping compatible with irrlicht 1.8
1 parent 251e3e0 commit c6cb97e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/game.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,12 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter
807807

808808
// Normal map texture layer
809809
int layer = 1;
810+
// before 1.8 there isn't a "integer interface", only float
811+
#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
810812
services->setPixelShaderConstant("normalTexture" , (irr::f32*)&layer, 1);
813+
#else
814+
services->setPixelShaderConstant("normalTexture" , (irr::s32*)&layer, 1);
815+
#endif
811816
}
812817
};
813818

0 commit comments

Comments
 (0)