![]() |
Opengl problem
1 Attachment(s)
Hello i'm trying to get an example in my book working. It is supposed to allow you to move the camera around in a 3d scene. It compiles fine but when i try to run it the window is destorted and i cant figure out why.
there are four files Point3, Vector3, camera.h, and test.cpp I included them in a zip file and it is attached |
The first error is in the function call to glClear at Ln. 70 in test.cpp.
Bad :
glClear(GL_COLOR_BUFFER_BIT||GL_DEPTH_BUFFER_BIT);:
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);The second error is in the Camera::setShape function, where the identity matrix should be loaded before you set the matrix mode. Bad :
glMatrixMode(GL_PROJECTION);:
glLoadIdentity();Have a nice day! /Klarre |
thank you so much that worked
|
| All times are GMT -5. The time now is 1:11 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC