View Full Version : Perspective
03-23-2000, 01:02 PM
I don't have any experience with perspective but i understand the system. My problem is when i define my environnement with gluPerspective or with glFrustum i have very weird view of my objects on screen, somewhat dark and my pieces look very weird (there is full of line that appears an disappears in place of filled polygons) When i'm in glOrtho mode there is no problems. So do i had forgot to add lines or it's my light or what?? thanks!
What kind of calls to gluPerspective and glOrtho do you use? Paste some code here. And no, it is definitely not a lighting problem http://www.opengl.org/discussion_boards/ubb/biggrin.gif
03-24-2000, 04:13 AM
You should find all you need to know on this site.
The chapter 3 is on Viewing...
PS: J'ai vu dans ton profile que tu reste à chicoutimi (et que tu dois donc parler français aussi) moi je viens de Jonquière ça fait drôle de voir du monde de la région dans ce forum. Salut!!!
03-25-2000, 08:01 AM
Here is an exemple of my init code for gluPerspective
My object is at (0.0,0.0,-10.0) i see it but not the way it should be.
P.S. Salut Popol c'est vrai que sa fait drole de voir quelqu'un de la region c cool!
03-25-2000, 09:18 AM
First of all i think gluPerspective only take 4 parameters (not 5).
Here a exemple of what i but normally in my program:
Width and Height are the Width and Height of my window.
Here a reference to this function:
void gluPerspective(GLdouble fovy,
Specifies the field of view angle, in degrees, in the y direction.
Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
Specifies the distance from the viewer to the near clipping plane (always positive).
Specifies the distance from the viewer to the far clipping plane (always positive).
Hope it's help you!
03-25-2000, 09:43 AM
I know all that but it doesn't work, I define my gluperspective on an older version where the lightning system was not enabled (i use glcolor3d, and glortho) and i just replace glortho by gluperspective and it work just fine. When i try on my final version it sucks a lot even if i don't init my lightning it s a very weird bug i think or i forgot a fondamental fucntion anyone have an idea?!!
the zNear MUST NEVER be 0, if you want it close to 0 you 0.1 :
the reason is : zNear divides some components in the Projection matrix.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.