![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2006
Posts: 14
Rep Power: 0
![]() |
Opengl problem
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 |
|
|
|
|
|
#2 |
|
Game engine designer
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4
![]() |
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(); glLoadIdentity(); glMatrixMode(GL_PROJECTION); Have a nice day! /Klarre
__________________
http://www.klarre.se |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Mar 2006
Posts: 14
Rep Power: 0
![]() |
thank you so much that worked
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OpenGL, SDL, and DirectX | Baphomet | Coder's Corner Lounge | 45 | Jul 25th, 2006 12:44 PM |
| cgi/perl script + IE problem | joyceshee | Perl | 2 | Jan 24th, 2006 11:10 AM |
| OpenGL and Dev-C++ | clearbit | C++ | 4 | Jul 27th, 2005 7:58 PM |
| OpenGL | Broax | C++ | 7 | Jul 26th, 2005 6:47 PM |
| 3d OpenGL I need an understanding please? | scorpiosage | Other Programming Languages | 1 | Apr 14th, 2005 8:18 PM |