Animate sprite/texture position with VBO

Posted by Dono on Game Development See other posts from Game Development or by Dono
Published on 2012-10-10T21:30:03Z Indexed on 2012/10/10 21:56 UTC
Read the original article Hit count: 187

Filed under:
|
|

I'm currently worlking on a renderer for my projects and I want animate a sprite on screen. I've got a spritesheet but I don't know what is the the best way to update the texture coordinates for each vertex.

  • Update vertices then update vertex buffer. (Heavy ?)
  • Send to the shader my texture coordinates (It is possible ?)
  • Don't use VBO ?

By the way, I've got this structure : Object class with Geometry (Faces + Vertex + Buffer) and Material (Shader + other stuff ) properties, it is a good structure ?

Thanks!

© Game Development or respective owner

Related posts about opengl

Related posts about sprites