Line prob
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.
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.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement