PDA

View Full Version : How to ensure a vertex inside the window?



davie
04-07-2010, 11:24 PM
Hi all,

I often draw vertex outside the window, ie, my window is 800x480 and my settings are as follow:

glViewport(0, 0, 800, 480);
gluPerspective(90.0f, 800/480, 0.1f, 100.0f);
glTranslatef(1.0f, 0.0f, -6.0f);

i dont know where is the left/right/top/bottom most point that
i can draw.
ie, is the point(-5.0f, 0.0f, 0.0f) inside my window? what about the point(-7.0f, 0.0f, 0.0f)?

Rosario Leonardi
04-08-2010, 02:48 AM
Check this:
http://www2.ravensoft.com/users/ggribb/plane%20extraction.pdf

davie
04-08-2010, 04:47 AM
Hi Rosario Leonardi,

Thanks for your help! I will read it, thanks again!