Commit 2d01842f authored by Nadro's avatar Nadro

- Fixed "Error setting int array for HLSL variable" issue in example 10.Shaders.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4221 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 47b8c747
...@@ -107,7 +107,7 @@ public: ...@@ -107,7 +107,7 @@ public:
services->setVertexShaderConstant("mTransWorld", world.pointer(), 16); services->setVertexShaderConstant("mTransWorld", world.pointer(), 16);
// set texture, for textures it's very important to pass an int instead of float for a setPixelShaderConstant method. // set texture, for textures it's very important to pass an int instead of float for a setPixelShaderConstant method.
s32 TextureLayerID = 0; s32 TextureLayerID = 0;
if (UseHighLevelShaders) if (UseHighLevelShaders && driver->getDriverType() == video::EDT_OPENGL)
services->setPixelShaderConstant("myTexture", &TextureLayerID, 1); services->setPixelShaderConstant("myTexture", &TextureLayerID, 1);
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment