Thanks, Tony
However, I started from the OSGMFC example which works fine (it has the
steps you mention) except it is MDI. I mirrored the code into an SDI
where it does not draw. The only real changes are in the CWinApp to the
doc. template.
The only SDI examples I can find are on MSDN involving raw OpenGL.
I have run out of ideas including looking for stupid things I have done!
Alan
Tony Glover wrote:
Alan Harris wrote:
I am trying to get to grips with an MFC implementation of OSG and I
have successfully compiled and used OSGMFC example.
It is an MDI example and I have tried to convert it to SDI. However
for the SDI there is no drawing taking place, although the
DoFrame() function is called and there are no error messages.
I am using VS7.
Has anyone tried to use SDI and have an example? Am I missing
something simple?
Hi,
Using OSG and MFC is pretty straightforward and I thought that
there were some SDI examples on the OSG site somewhere?
Anyway, in the past I've created SDI apps with MFC and basically just
done the following:-
o In your window's OnCreate function, just set up a rendersurface and
set the window handle via the GetSafeHwnd() method.
o Set up a osgUtil::SceneView with the appropriate defaults and then
set up your scene accordingly.
o In the DoFrame() method (or whatever you've called it) just update
the scene as you would for any OSG app, as in performing the
appropriate update, cull and draw of your scene.
I'm assuming that your original example has handled all the other
necessary things such as keyboard and mouse updates, window resizing,
etc.
It's been a while since I used the MFC app but can't remember any
major problems with it. If you need any more info then let me know.
Cheers,
Tony.
_______________________________________________
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/