aoikonom
09-08-2012 12:56:23
I am trying to use MyGUI with OgreGLES2RenderSystem in an Ogre3d4Marmalade (an Ogre fork for the Marmalade framework).
At first it did not work because MyGUI does not bind any gpu program. Then following instructions from another thread http://www.ogre3d.org/forums/viewtopic.php?f=21&t=63824 I used the suggested simple verted/fragment shader programs, and now MyGUI works.
Problem is that text is drawn white, while I want multi-coloured text (some portions red, other white, etc).
I guess the problem is that _setTextureBlendMode is not supported in OgreGLES2RenderSystem. Maybe I should write a more sophisticated vertex/fragment program but I'm not sure how to do so.
My current vertex/fragment programs :
vertex
fragment
Any ideas?
At first it did not work because MyGUI does not bind any gpu program. Then following instructions from another thread http://www.ogre3d.org/forums/viewtopic.php?f=21&t=63824 I used the suggested simple verted/fragment shader programs, and now MyGUI works.
Problem is that text is drawn white, while I want multi-coloured text (some portions red, other white, etc).
I guess the problem is that _setTextureBlendMode is not supported in OgreGLES2RenderSystem. Maybe I should write a more sophisticated vertex/fragment program but I'm not sure how to do so.
My current vertex/fragment programs :
vertex
#version 100
precision mediump int;
precision mediump float;
attribute vec4 position;
attribute vec4 uv0;
varying vec4 outUV0;
/*
Basic texturing vertex program for GLSL ES
*/
void main()
{
gl_Position = position;
outUV0 = uv0;
}
fragment
#version 100
precision mediump int;
precision mediump float;
uniform sampler2D sampler;
varying vec4 outUV0;
/*
Basic texturing fragment program for GLSL ES
*/
void main()
{
gl_FragColor = texture2D(sampler, outUV0.xy) ;
}
Any ideas?