I have a QT canvas and I'm using shaders to build my scence. I've set the camera image plane at some position, and would like to view object from the image plane to infinity. How do I set the zfar and znear values?
You can't make OpenGL render to infinity. The depth buffer usually uses floats (it can use other types, but none of them can represent an infinite number of values), meaning it has a set precision. If you set the zFar value to 100,000 for instance (not even close to infinity), then you'll have problems with z fighting between objects, that are hundreds of units apart from each other.