Archived

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

resubmiting vertexes

This topic is 5675 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

let''s sa I have a mesh. I want to show the mesh in 2 positions. If I already submit the mesh to video card first time when I''m painting it, with current selected transformation matrix, then I change the tr matrix and I want to draw it again in new position why I have to resend all the vertexes again. Is there a technique to tell to open gl reuse alrady submited vertexex ? MCO

Share this post


Link to post
Share on other sites
Go to HEHE! or use this simple exmple!


  
Gluint Displaylist;
...
void MAKEDISPLAYLIST()
{
Displaylist=glGenLists(1); // Gets the memory ready

glNewList(Displaylist,GL_COMPILE); // kinda like glBegin() for Displaylists


DrawMyModel(); //draw your entire model inside glNewList and glEndList.


glEndList(); // kinda like glEnd() for Displaylists

...

void DrawMyDisplayList()
{
glCallList(Displaylist); // Draws Displaylist

}

Share this post


Link to post
Share on other sites