OpenGL clipping

Started by
6 comments, last by Herr_O 22 years, 6 months ago
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...
_____________________________
www.OddGames.comwww.OddGames.com/daniel
Advertisement
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
CodeSmith the Pixel PusherCodeSmith Webpage
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
_____________________________
www.OddGames.comwww.OddGames.com/daniel
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.
Dirk =[Scarab]= Gerrits
Oki, I''ve tested a few of NeHe''s tutorials.. but not that one
_____________________________
www.OddGames.comwww.OddGames.com/daniel
Hehe, ok good luck then. Post another reply if you need more help.
Dirk =[Scarab]= Gerrits
nah, now it works. thanks alot! :D
_____________________________
www.OddGames.comwww.OddGames.com/daniel
No problem.
Dirk =[Scarab]= Gerrits

This topic is closed to new replies.

Advertisement