Archived

This topic is now archived and is closed to further replies.

Indexed Primatives?

This topic is 5126 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites