PDA

View Full Version : Shaders activated?



ooohYeah
08-07-2009, 09:48 AM
Hi Everybody!

Here my issue:
I'm a begginer with OpenGL ES and there is something I don't understand:
I set vertex and pixel shader program but it seems that when I remove it, rendering gets anyway.
Moreover even if I do : "gl_Position = 1;" it also renders well.

Is there a function that when you use it force the using of fixed pipelines?

Sorry but I can't show you my code, but here mu shader program:



const char* vertexsource =
"attribute vec4 POSITION;\
attribute vec2 TEXCOORD0;\
varying vec2 texcoord;\
void main(void)\
{\
gl_Position = POSITION;\
texcoord = TEXCOORD0;\
}";

const char* fragmentsource =
"varying vec2 texcoord;\
uniform sampler2D texture;\
void main(void)\
{\
gl_FragColor = texture2D(texture, texcoord);\
}";


Thanks!

PS: Sorry for my english bu as we should guess I'm not english!