cant show normal models???
I have two scenes.
One i draw in ortho with textures.
The next is just some models without textures.
After ran the scenes a few times my scene with models (no textures) wont show anymore.. Is there a bit i forgot to set somewhere?
Scene with texture:
void scene1() {
ortho();
glColor3f(1.0f,1.0f,1.0f);
if (frame) {
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, frame);
glbegin ... end
glDisable(GL_TEXTURE_2D);
}
}
Scene without texture:
void scene2() {
glPushMatrix();
glScalef(0.5f, 0.5f, 0.5f);
glTranslatef(0,1.0f,0);
glBegin(GL_QUADS); .... glEnd()
glPopMatrix();
}
main() {
while (...) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity(); // Reset The
gluLookAt(objCamera.mPos.x, objCamera.mPos.y, objCamera.mPos.z,
objCamera.mView.x, objCamera.mView.y, objCamera.mView.z,
objCamera.mUp.x, objCamera.mUp.y, objCamera.mUp.z);
// draw either scene 1 or 2.
if (..)
scene1();
else
scene2();
}
}
(for more detailed file info see www.thurmann.net/cpp)
www.ageofconan.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement