ShinGouki
05-08-2003, 08:42 PM
yet another question, sorry guys lol
void reshape(int width, int height)
{
if (height==0) // Prevent A Divide By Zero By
{
height=1; // Making Height Equal One
}
glViewport(0,0,width,height); // Reset The Current Viewport
ASPECT_RATIO = (float)width/(float)height;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0, ASPECT_RATIO, 1.0, 4000.0);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Black background
glutPostRedisplay();
glutSwapBuffers();
glMatrixMode(GL_MODELVIEW);
}
this seems to be causing my pc to crash horribly when i resize in certain directions, can you spot any obvious discrepancies about what im doing?
*i feel like im one of those bug busting questions in C++ in 21 days, can you spot the bug http://www.opengl.org/discussion_boards/ubb/wink.gif*
void reshape(int width, int height)
{
if (height==0) // Prevent A Divide By Zero By
{
height=1; // Making Height Equal One
}
glViewport(0,0,width,height); // Reset The Current Viewport
ASPECT_RATIO = (float)width/(float)height;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0, ASPECT_RATIO, 1.0, 4000.0);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Black background
glutPostRedisplay();
glutSwapBuffers();
glMatrixMode(GL_MODELVIEW);
}
this seems to be causing my pc to crash horribly when i resize in certain directions, can you spot any obvious discrepancies about what im doing?
*i feel like im one of those bug busting questions in C++ in 21 days, can you spot the bug http://www.opengl.org/discussion_boards/ubb/wink.gif*