The_V|k|ng
09-02-2002, 04:07 AM
Heya dudes!
I recently upgraded my PC with a Geforce4 Ti4200. Starting my little OGL program that i am working on, I realized that all my models were pitch black. They were drawn properly with textures and all when I had lighting disabled, but lighting is a useful thing to have. Besides, it worked all fine when I still had my old TNT2.
My code looks like this:
void CSpaceShip::Render ()
{
unsigned char i;
switch (State) {
case SS_DESTROYED: break;
default:
glEnable (GL_DEPTH_TEST);
glEnable (GL_LIGHTING);
glPushMatrix ();
glTranslatef (Position.values[0],
Position.values[1],
Position.values[2]);
glRotatef (Rad2Deg(OrientationAngle), 0.0, 1.0, 0.0);
glCallList (ModelDisplayList);
glPopMatrix ();
break;
}
}
So, where's the difference? Has someone had the same problems and a solution to this? Any sort of hint is appreciated! Thanx in advance!
Regards,
The_V|k|ng
I recently upgraded my PC with a Geforce4 Ti4200. Starting my little OGL program that i am working on, I realized that all my models were pitch black. They were drawn properly with textures and all when I had lighting disabled, but lighting is a useful thing to have. Besides, it worked all fine when I still had my old TNT2.
My code looks like this:
void CSpaceShip::Render ()
{
unsigned char i;
switch (State) {
case SS_DESTROYED: break;
default:
glEnable (GL_DEPTH_TEST);
glEnable (GL_LIGHTING);
glPushMatrix ();
glTranslatef (Position.values[0],
Position.values[1],
Position.values[2]);
glRotatef (Rad2Deg(OrientationAngle), 0.0, 1.0, 0.0);
glCallList (ModelDisplayList);
glPopMatrix ();
break;
}
}
So, where's the difference? Has someone had the same problems and a solution to this? Any sort of hint is appreciated! Thanx in advance!
Regards,
The_V|k|ng