How to modify VBO data

Posted by Romeo on Game Development See other posts from Game Development or by Romeo
Published on 2013-07-01T17:04:19Z Indexed on 2013/07/01 17:13 UTC
Read the original article Hit count: 256

Filed under:
|
|
|

I am learning LWJGL so i can start working on my game. In order to learn LWJGL I got the idea to implement the map builder so I can get comfortable with graphics programming. Now, for the map creation tool I need to draw new elements or draw the old one's with different coordinates.

Let me explain this:

My game will be a 2D scroller. The map will be consisting of multiple rectangles ( 2 strip triangles). When I click my left-mouse button i want to start the rectangle and when I release it I want to stop the rectangle bottom-right at that position.

As I want to use VBOs I want to know how to modify data inside the VBO based on user input. Should i have a copy of a vertex array and then add the whole array to the VBO at each user input? How is usually implemented the VBO update?

© Game Development or respective owner

Related posts about opengl

Related posts about java