I want to ask question related to gluPerspective() function. We use gluPerspective() function in opengl for the persective projection.I can know the extents of my scene in z direction by the parameter 'far' and 'near' of this function. But what about extents in x direction and y direction. I mean how can I know that a given parameter will lie in my view volume or not.
For example if I use gluPerspective like this
gluPerspective( 45.0, aspect, 1.0, 20.0 );
and in my draw function if I write the following set of code
glBegin( GL_TRIANGLES );
glVertex2f( -0.5f, -0.5f, -10.0 );
glVertex2f( 0.5f, -0.5f, -10.0 );
glVertex2f( 0.0f, 0.5f, -10.0 );
How can i confirm that this triangle will lie in my viewing volume created by gluPerspective.