View Full Version : how to clip ??
03-31-2002, 03:08 AM
I realise that openGL do the clip automatically(chop all the points that off the screen view) But i would like to know whether anyone has the actual code on how to clip this points if it's off the screen? Thanx's....
03-31-2002, 09:35 AM
You will need to transform the point into clip coordinates, then see if it's inside your view.
gluProject() can do this or just multiply your vertex with the modelview, then the projection, Easy to do. Download the GLU source code (from SGI).
03-31-2002, 03:29 PM
you mentioned about downloading the GLU source code from SGI. Do you know where i can download this thingie? Thanx's.
03-31-2002, 08:57 PM
http://www.gametutorials.com has a frustum culling tutorial in the opengl sections. It tells you if a point/cube/sphere are in your view frustum.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.