laoding lighting
hello there .
is there any implementation to load lighting into opengl , if i desigend an 3ds object with 3D MAX ?????
THX
With OpenGL you just have to turn on lighting with a few functions and make sure your model has normals setup or you have to calculate them so OpenGL knows how to light the model correclty.
make sure you disable lighting when you are done with it... HTH
glEnable(GL_LIGHTING);glEnable(GL_LIGHT0);//then use this to position your light sourceglLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
make sure you disable lighting when you are done with it... HTH
maybe you should define your light:
GLfloat LightAmbient[] = { 0.5, 0.5, 0.5, 1.0 };
and then:
glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient);
GLfloat LightAmbient[] = { 0.5, 0.5, 0.5, 1.0 };
and then:
glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement