• Advertisement

Archived

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

Display List Problem

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

Here''s the code: //global GLuint laser; // GLvoid BuildList() { laser=glGenLists(1); glNewList(laser,GL_COMPILE); glLineWidth(1); glColor3f(1.0f,0.0f,0.0f); glBindTexture(GL_TEXTURE_2D, texture[4]); glBegin(GL_LINES); glVertex3f(0.0f,0.0f,0.0f); glVertex3f(0.0f,0.25f,0.0f); glEnd(); glEndList(); } void lasers(){ glLoadIdentity(); glTranslatef(rightlaserx,rightlasery,yourshipz); glCallList(laser); } int DrawGLScene(GLvoid) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); lasers(); return TRUE; } The laser doesn''t show up. Any ideas? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Hmm, no, that''s not the problem. It works fine when I take away the display list and just have this:

glLoadIdentity();
glTranslatef(rightlaserx,rightlasery,yourshipz);
glLineWidth(1);
glColor3f(1.0f,0.0f,0.0f);
glBindTexture(GL_TEXTURE_2D, texture[4]);
glBegin(GL_LINES);
glVertex3f(0.0f,0.0f,0.0f);
glVertex3f(0.0f,0.25f,0.0f);
glEnd();

Share this post


Link to post
Share on other sites
yeah, i''ve never used GL_COMPILE_AND_EXECUTE. what''s the diff?
why does it work? what''s wrong with GL_COMPILE?

a2k

Share this post


Link to post
Share on other sites

  • Advertisement