Indexed Primatives?

Started by
2 comments, last by HippieHunter 20 years, 4 months ago
im dumb and have thus far only used D3D, i have come to an impass and now openGL is looking like a better option. what I want to know is, does OpenGl have the concept of indexed primatives? how else would OpenGL users make use of Vertex Caches, or do you. are they a purely D3D concept or did microsoft steal them from OpenGL?
Advertisement
I''m fairly sure you want to get hold of ARB_vertex_buffer_object that exploits the on board vram as vertex storage.

Another good thing is
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(...);

and

glDrawElements(..);

I don''t know how indices differ from direct x, but drawElements specifies the "indexarray" and vertexPointer specifies the "data".

It is no use for me to explain it here as you can google up example with:

ARB_vertex_buffer_object
glDrawElements

VBO uses glDrawElements...
quote:Original post by HippieHunter
im dumb and have thus far only used D3D, i have come to an impass and now openGL is looking like a better option. what I want to know is, does OpenGl have the concept of indexed primatives? how else would OpenGL users make use of Vertex Caches, or do you. are they a purely D3D concept or did microsoft steal them from OpenGL?

Do you mean rendering using index buffers? In OpenGL''s ARB_vertex_buffer_object extension this is refered to as an index array.

Check out the spec for vertex buffer objects:

http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_buffer_object.txt

Index arrays are dealt with in section 2.8B.1.
-Ostsol
keep in mind that you dont need vbo to use index arrays, but if you already care about the vertex cache you should definitely use it for performance reasons as its the only way (besides proprietary extensions like var and vao) to store your data in agp or video memory.
f@dzhttp://festini.device-zero.de

This topic is closed to new replies.

Advertisement