Sign in to follow this  
waZim

glDrawElement() in Display Lists

Recommended Posts

Preprocessing:
GLuint list = glGenLists(1);
glNewList(list, GL_COMPILE);
// draw vertex array
glVertexPointer(3, GL_FLOAT, 0, &vertices[0]);
glDrawElements(GL_TRIANGLE_STRIP, indices.size(),GL_UNSIGNED_SHORT, &indices[0]);
glEndList();

Rendering:
glCallList(list);

Is this gonna accelerate the System?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this