Advertisement

Line prob

Started by November 25, 2003 10:10 PM
1 comment, last by Nerothos 21 years, 3 months ago
I'm trying to create a buncha green lines in my DrawGLScene() function, and it compiles fine, but when I run it, it errors. What's wrong?: int DrawGLScene(GLvoid) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); gluLookAt(0, 1.5f, 6, 0, 1.5f, 0, 0, 1, 0); glColor3f(0.0f, 1.0f, 0.0f); for(float i = -50; i < 51; i++) { glBegin(GL_LINES); glVertex3f(-50, 0, i); glVertex3f(50, 0, i); glVertex3f(i, 0, -50); glVertex3f(i, 0, 50); glEnd(); } return true; } Jump in and crash the system...it''s quite humbling. [edited by - Nerothos on November 25, 2003 11:10:47 PM]
Jump in and crash the system...it''s quite humbling.
I don''t think its anything with your drawing code. Use debug to find where it is crashing, and then give us that code.
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
Advertisement
try using a while loop, i have had problems with for loops before(They would just run infinitly and never exit) so i never use them anymore.

This topic is closed to new replies.

Advertisement