Who knows how to set the position of the projection plane in OpenGL, or, is there a way to set focus value when using OpenGL?
I am how working on an algorithm, which needs this value. But I don’t know how to do this I hope who knows this could tell me. Thank you very much!
[/b]
The projection matrix does not have a position. The position of the observer comes with the modelview matrix.
There is no such thing as a focus in standard OpenGL, because the camera is treated as an infinitely small point. Like a pinhole camera. If you want a point of focus, you should have a look at the “depth of field” effect, which simulates a real camera lens.
god knows what you’re asking for, but in case you’re talking about specifying a frustum that has a different projection plane to the near plane, then here’s some code to do it:-
I’ve posted code before…not very frequently, but a handful of times.
I’m procrastinating on a problem of my own, so I’ve done all the hoovering, all the washing, re-arranged my front room, and pasted code onto a forum. What else can I do to distract me from the real issue at hand???