c0d3Junk3Y
07-30-2003, 05:06 AM
I am making a screensaver, and I want to use texture mapping. I have all my basecode done, it compiles without error. The problem is that there is a blank screen displayed.
void SetupAnimation(int Width, int Height)
{
glViewport(0,0,(GLsizei)Width,(GLsizei)Height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-300, 300, -240, 240, 25, 75);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(0.0, 0.0, 50.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
// background
glClearColor(0.0, 0.0, 0.0, 0.0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glShadeModel(GL_SMOOTH);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[0]);
}
That is my code and setup for GL. Any thoughts?
void SetupAnimation(int Width, int Height)
{
glViewport(0,0,(GLsizei)Width,(GLsizei)Height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-300, 300, -240, 240, 25, 75);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(0.0, 0.0, 50.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
// background
glClearColor(0.0, 0.0, 0.0, 0.0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glShadeModel(GL_SMOOTH);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[0]);
}
That is my code and setup for GL. Any thoughts?