VBO and indexed vertexes
Hy there.
Maybe you can help me with this and tell me whats the best way of rendering my objects.
i have the vertexes put in an array "vertexes"
i have the textures and normals also put in their own arrays.
and i have the indexes of the vertexes.
what im doing now is like this:
at initialization compute a vector<CVector3> verts with all the vertexes push_back based on de indexes... - so from 200 "vertexes" i now have like 600 put in the vector "verts". afther that compute a VBO - clear the vector "verts" and render the VBO.
what i want is to pass the "vertexes" to the vbo not the "verts" - so instead of passing 600 just pass 200. and then render based on the indexes.
i tried this with glVertexPointer(....vertexes);
glDrawElements(..... indexes); but that doesnt give me performance; so i may be doing something wrong.
Can you guys help me?
pls forgive my english:)
Thanks
There is an example here. It places vertices, texcoord, normals in the same array. It is called an interlaced format, for better performance.
http://www.opengl.org/wiki/index.php/GL_ARB_vertex_buffer_object
http://www.opengl.org/wiki/index.php/GL_ARB_vertex_buffer_object
Quote:Original post by V-man
There is an example here. It places vertices, texcoord, normals in the same array. It is called an interlaced format, for better performance.
http://www.opengl.org/wiki/index.php/GL_ARB_vertex_buffer_object
Interleaved :) not interlaced!
Quote:Original post by V-man
You say tomato, I say potato.
The problem is that interlaced already has another, very specific meaning, also as related to graphics (i.e. 1080i as opposed to 1080p for resolutions).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement