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…
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).
you mentioned about downloading the GLU source code from SGI. Do you know where i can download this thingie? Thanx’s.
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.