PDA

View Full Version : help! how to make Shader in proton example



feelthat
06-10-2013, 06:01 PM
Dear all:

need use shader
video::IMaterialRendererServices* services

how to get IMaterialRendererServices this pointer?



Ex:

core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
invWorld.makeInverse();

if (UseHighLevelShaders)
services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16);
else
services->setVertexShaderConstant(invWorld.pointer(), 0, 4);

Zaxuhe
06-13-2013, 04:28 PM
As far I know its not possible to use shaders in proton sdk since it uses opengl es 1.0, and shaders are only on opengl es 2.0+ (correct me if I' wrong)

Dear all:

need use shader
video::IMaterialRendererServices* services

how to get IMaterialRendererServices this pointer?



Ex:

core::matrix4 invWorld = driver->getTransform(video::ETS_WORLD);
invWorld.makeInverse();

if (UseHighLevelShaders)
services->setVertexShaderConstant("mInvWorld", invWorld.pointer(), 16);
else
services->setVertexShaderConstant(invWorld.pointer(), 0, 4);

feelthat
06-13-2013, 05:32 PM
not sure but thanks, anyone more answer?


As far I know its not possible to use shaders in proton sdk since it uses opengl es 1.0, and shaders are only on opengl es 2.0+ (correct me if I' wrong)