StuStirling
StuStirling

Reputation: 16221

OpenGL-ES Basic Animation

Confusing myself with this OpenGL stuff. What I want to do is move a series of vertexes to a position over a certain amount of time. Reading this tutorial I understand the keyframe and interpolation principle but the way its implemented in the tutorial is way to complex for me.
All my vertex data is in a GLfloat array

GLfloat triangle [6];
triangle[0] = 0; //x coord
triangle[1] = 10; //y coord

You get the idea ^^. There is no z coord as I don't need 3D. I can draw it fine and have been for a while but now I want to animate.
Anyone know of any good, simple tutorials for losers like me :)
Any help would be much appreciated.

Upvotes: 0

Views: 614

Answers (1)

Bogatyr
Bogatyr

Reputation: 19333

What you should be looking for is tutorials addressing the matrix stacks in OpenGL. What you want to do to animate your object is not to hack your triangle array data values, but to apply transformation matrices to translate/rotate/scale your object in the scene.

Here's one for Android but it's OpenGL ES so should equally apply:

http://blog.jayway.com/2010/01/01/opengl-es-tutorial-for-android-–-part-iii-–-transformations/

Upvotes: 1

Related Questions