[osg-users] Problems integrating MFC example with existing application

Jesper D. Thomsen jdt at anybodytech.com
Tue Sep 30 07:32:33 PDT 2008


Hi again all,

I have an existing MFC application with a window based on Cview, which have been used as an OpenGL rendering canvas. I have now disabled the OpenGL rendering of the window and instead replicated the osgviewermfc example in my application in exactly the same way as in the example.

The problem is that I can't get my model to render, even though the backgroundcolor is defined and rendered by the osg viewer.

When debugging the application I noticed that the viewer-view-_slaves-[0]-_projectionOffset-_mat-[0]...[3]-[0] values change from their initialisation from "addslave" to "-1.#IND00000000000" right after i dispatch the rendering thread. This off course causes further problems in frame() with other values going bad.

My question is whether OSG could be doing this, or if it must be the original application writing somewhere it shouldn't? Or does OSG use som standard OpenGL variables which might be overwritten by the existing application?

Regards, and I know this problem is rightly irritating, but I hope somebody can give me some hints.

Jesper D. Thomsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080930/466c9877/attachment-0002.htm>


More information about the osg-users mailing list