Hi Andrew,

I am using Visual Studio 2005 SP1, and using the standard toolset.
There is not a problem with compilation - it is a linking problem. The problem only occurs when
- My code has  a class derived from osg::Camera::DrawCallBack
- Linked in  release mode.

That means the issue would be encountered only rarely. Obviously it is some 
kind of obscure Windows compile/link issue, but it is real.

Your issue is really weird. We use Visual Studio 2005 SP1, and use camera DrawCallbacks occasionally, and we've never had that kind of problem.

Camera DrawCallbacks are used in various places in OSG and in its examples. For example, the ScreenCaptureHandler that is standard with osgViewer uses a camera DrawCallback to do its work. So as a sanity check, you can try to compile a recent version of OSG (with the osgviewer application) with your compiler in Release mode. Then run "osgviewer cow.osg" and press 'c'. That will use the DrawCallback to capture a screen shot to the file "screen_shot_0.jpg" (by default) in the current directory. If this works, then the problem must be in your application or your project settings or something similar...

I just tested this and it works on my machine (with OSG SVN compiled at midnight last night, on VC++ 2005 SP1).

Are you sure you're not passing your DrawCallback by value somewhere, thus slicing off its vtbl? Or is something else in your usage peculiar? I don't really know what to tell you to look for, it's just a bizarre problem...

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to