PDA

View Full Version : ViewVolume and Clipping in OpenGL 3.x



usr666
08-13-2009, 11:40 AM
How to set view volume or clipping in OGL 3.x?
I've read something about gl_ClipDistance[ i ] but I'm not sure how to use it.

Is there any good tutorial about clipping in OGL 3 or any way to disable clipping?

Hlz
08-13-2009, 09:50 PM
Among other things there's a brief mention of this in the GLSL Siggraph presentation linked in a thread below.

ClipDistance is just a value that's interpolated across the primitive. Negative values are considered in back of the plane or in the negative half-space. The union of the positive half-spaces forms the actual view volume.

usr666
08-14-2009, 01:48 AM
But what functions should I use to set my own view volume? Section 2.19 of GLspec do not mention any functions nor vertex shader functions used that can be used as alternative to glOrtho()?

My current problem is that some parts of geometry are clipped before they go out of view. It looks like I'm stuck with in 1x1x1 view volume cube.

Any idea's of a way around it?