Hi everbody,
My OpenGL knowledge is limited. Anyways, I would like to use dynamic VBO.
Consulting gamedev forum and this one, I understand it is recomanded to create two VBO :
- The first one with vertex, normals, textures coords, like pricec suggested in the thread
http://lwjgl.org/forum/viewtopic.php?t=757&highlight=vbo :
Niels, what you should be doing is packing vertex data thus:
x,y,z,nx,ny,nz,tx0,ty0,tx1,ty1,tx2,ty2,tx3,ty3
You write all the data but once, linearly, from start to finish, every frame, optionally skipping data that has not changed.
- The second contains index.
My questions are :
1. How can I implement the first VBO, I mean in opengl : should I use glBufferSubDataARB ? like it is shown in
http://www.spec.org/gpc/opc.static/vbo_whitepaper.html2. I think the second VBO can help me to solve my first question, but I don't know how. (due probably to my lack of knowledge).
3. As dynamic VBO, the first one change every time, I think I have to create and bind a new vbo every time, is it exact ?
Thanks in advance.