I did not use Producer based viewer at all. I used an osgUtil::sceneView with single camera. That's why I feel weird about getting identity projection matrix.

The reason for me to use sceneView instead of osgProducer::Viewer is because I need traditional 2D GUI such as menus, dialog, option windows in my program. You could see it form this image http://mason.gmu.edu/~yliu6/gallery/vsp004010/vs_gui.jpg. No idea how to integrate those things into osgProducer::Viewer.

Yanling

On 5/17/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
On 5/17/06, Yanling Liu <[EMAIL PROTECTED]> wrote:
Thanks Robert.

You said that "The glGetDouble is not in thread that has the current graphics context as will produce undefined results if not a crash..."

But which thread actually has the current graphics context? I see that my program has only one thread in Windows task manager. I created the opengl context in the only thread but later on the thread could not have the current context?  Does OSG induce some hidden threads which take over the current context from my thread?

Producer can thread the frame method, one thread per camera.  If you have just one camera then it'll be single threaded, but if you have two cameras then it'll select multi-threaded.

If you are using a Producer based viewer such as osgProducer::Viewer then please use the Producer::CameraGroup for view and projection matrices - the projection matrices under the lens controls.

Robert.

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to