Jump to content

  • Log In with Google      Sign In   
  • Create Account


Render model in non perspective mode


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Kristoffer   Crossbones+   -  Reputation: 823

Like
0Likes
Like

Posted 20 April 2006 - 05:28 AM

this might be simple but how do i setup a non perspective viewing where i can draw a 3d model but without the perspective like in blender where you choose Orthographic i tried to draw the x,y (z = depth) coordinates of my model in 2d view but didnt succeed is this the correct way or am i wrong? thanks

Sponsor:

#2 scgames   Members   -  Reputation: 1977

Like
0Likes
Like

Posted 20 April 2006 - 05:33 AM

Is this software rendering of some sort, or are you using a graphics API?

#3 Kristoffer   Crossbones+   -  Reputation: 823

Like
0Likes
Like

Posted 20 April 2006 - 05:48 AM

sry forgot
its opengl

#4 scgames   Members   -  Reputation: 1977

Like
0Likes
Like

Posted 20 April 2006 - 05:49 AM

OpenGL has functions for orthographic projection; just google or check out the Red Book.

#5 Kristoffer   Crossbones+   -  Reputation: 823

Like
0Likes
Like

Posted 20 April 2006 - 05:54 AM

iknow

glOrtho(left,right,top,bottom,znear,zfar)

gluOrtho2D(left,right,top,bottom)

but is that enough

shall i use
glVertex2d to diaply my 3d model?
will lightning work?

#6 haegarr   Crossbones+   -  Reputation: 3971

Like
0Likes
Like

Posted 20 April 2006 - 06:32 AM

Quote:
Original post by Hunter_Ex
glOrtho(left,right,top,bottom,znear,zfar)

gluOrtho2D(left,right,top,bottom)

but is that enough

shall i use
glVertex2d to diaply my 3d model?
will lightning work?

Notice please that projection is a mapping from a 3 dimensional space to a 2 dimensional space (in the case of 3D gfx; mathematically it is a general mapping from a space to a space of less dimensions). So in both cases you use glVertex3/glNormal3 routines to supply the 3D geometric scene data to GL as usual. (glVertex2 routines are more common for UI elements and such, since it implies a depth of 0.)

Notice furthur that gluOrtho2D may be not exactly what you are looking for since it restricts the depth range in a fixed way. Stay with glOrtho in general.

[Edited by - haegarr on April 20, 2006 1:32:57 PM]




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS