Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


OpenGL clipping


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
7 replies to this topic

#1 Herr_O   Members   -  Reputation: 184

Like
Likes
Like

Posted 17 October 2001 - 04:16 AM

Hi evry1! I''m wondering; how do you clip a 3d perspective to a ortho2d glu screen? I want to be able to display 3d objects on a ordinary 2d viewport and be able to zoom these objects so that they sometimes take up more space than the actual 3d display window (they get cliped). how how how? =) does any1 understand my question...

Sponsor:

#2 CodeSmith   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2001 - 04:32 AM

I don''t 100% understand you, but ''clipping'' is done in a Orthographic project in OpenGL through the ''znear'' and ''zfar'' parameters of glOrtho. If any object is before of after those area''s, then they are not drawn. Is that what you were looking for?

CodeSmith the Pixel Pusher
www.cs.trinity.edu/~csmith8

#3 Herr_O   Members   -  Reputation: 184

Like
Likes
Like

Posted 17 October 2001 - 04:51 AM

No not exactly.. I want this:

http://www.kemisten.nu/lgh10/temp.jpg

The 3d view with the ship - I want that part as another 3d view so that I can zoom in with the camera and the wings etc. of the ship gets cliped (haven't got any better word for it).

If I try to zoom the ship closer now.. then the wings and engines would go outside the display rectangle and into the other parts of the display.. not very nice looking

Edited by - Herr_O on October 17, 2001 11:55:34 AM

#4 Scarab0   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2001 - 07:50 AM

Ahh you want the scissors test then. I''m sorry, I don''t really use it often so I can''t explain it to you. But I happen to know that NeHe has a tutorial on it. Let me see.... ah yes, it''s this one: http://nehe.gamedev.net/tutorials/lesson25.asp

I think there is a second way to do this, but I have never tried it. I think you could set your glViewPort to the rectangle where you want your ship and it will also get clipped. But as said, I''m not 100% sure on this one.

Hope that helped.

#5 Herr_O   Members   -  Reputation: 184

Like
Likes
Like

Posted 17 October 2001 - 08:28 AM

Oki, I''ve tested a few of NeHe''s tutorials.. but not that one

#6 Scarab0   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2001 - 09:23 AM

Hehe, ok good luck then. Post another reply if you need more help.

#7 Herr_O   Members   -  Reputation: 184

Like
Likes
Like

Posted 17 October 2001 - 08:01 PM

nah, now it works. thanks alot! :D

#8 Scarab0   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 October 2001 - 09:01 PM

No problem.




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