IncreateScene(), my material setup code looks like;
Code: Select all
Ogre::MaterialPtr material = Ogre::MaterialManager::getSingleton().getByName("mytest");
material->getTechnique(0)->getPass(0)->setLightingEnabled(false);
mMiniScreen->setMaterial("mytest");
Code: Select all
fragment_program testFragmentProgram glsl
{
source test.frag
}
material mytest
{
technique
{
pass
{
fragment_program_ref testFragmentProgram{
param_named tex int 0
}
texture_unit {
texture BeachStones.jpg 2d
}
}
}
}
Code: Select all
varying vec2 texCoord;
uniform sampler2D tex;
void main(){
gl_FragColor = texture2D(tex, texCoord);
}
I used a texture that comes with Ogre, named BeachStones.jpg.
The log doesn't show any errors regarding finding the image.