- August 8, 2008 at 4:27 pm #29561
to move the point/object in OGLES?
How to use that? Thanks.August 19, 2008 at 1:49 am #32226
You can update the model vertices before you pass them to the vertex shader – or better yet, update them in the vertex shader when setting the gl_Position variable.August 19, 2008 at 2:03 am #32227
Thanks, could you explain more specifically? how to write the shader to show glTranslate()? Thanks a lot!August 19, 2008 at 2:16 am #32228
It’s all basic matrix math – maybe you should get a copy of the new OpenGL ES 2.0 book:
Is has some nice example code available at:
Unzip the example code and if you look at the Simple_VertexShader.c code in the Chapter_8 directory, you’ll see that uses its own internal ‘esTranslate()’ method to replicate the old ES 1.1 glTranslatef() functionality. That should be about all you need.