Hi,
I say that the plugins are available as I copied all generated exe's and dll's
to the working directory. But here is what the debug window shows when I try
to read a node. A few thing to note.
1. I had it working with OpenGL 1.0 or whatever the defaults were.
2. I rebuilt everything with Open GLES2.0. To do that I deleted the pixel and
graphicwindow32 files from the OSGViewer project.
3. Per the suggestions above I am trying to pass it my own graphic context.
4. The code compiles and runs but crashes when trying to read a node.
This is where I am currently stuck and not sure why it would do this as not
sure that any of the changes I made would impact reading a node.
5. Oh I added the environment variable OSG_NOTIFY_LEVEL and set it to DEBUG_FP
not sure what more we expect to see but I pasted what I saw below.
First-chance exception at 0x000007fefd8c940d in osgjoeytest.exe: Microsoft C++
exception: std::bad_alloc at memory location 0x0025b330..
First-chance exception at 0x000007fefd8c940d in osgjoeytest.exe: Microsoft C++
exception: std::bad_alloc at memory location 0x00258e60..
First-chance exception at 0x000007fefd8c940d in osgjoeytest.exe: Microsoft C++
exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x000007fefd8c940d in osgjoeytest.exe: Microsoft C++
exception: std::bad_alloc at memory location 0x00258e60..
Unhandled exception at 0x000007fefd8c940d in osgjoeytest.exe: Microsoft C++
exception: std::bad_alloc at memory location 0x00258e60..
Just in case this is part of the code I am trying to run. This was taken from
the GLUT example. I am in the middle of trying another example that is
different.
//Display the window.
ShowWindow(hWnd, SW_SHOW);
////////////////////////////////////////HWND/////////////////////////////////////////////
// create the view of the scene.
osg::ref_ptr<osgViewer::Viewer> viewerE = new osgViewer::Viewer;
viewerE->setReleaseContextAtEndOfFrameHint(false);
osg::observer_ptr<osgViewer::GraphicsWindow> window =
viewerE->setUpViewerAsEmbeddedInWindow(100,100,800,600);
//osg::ref_ptr<osg::Node> globeE =
osgDB::readNodeFile("C:\\workspace\\EarthFiles\\joey.earth");
osg::ref_ptr<osg::Node> globeE =
osgDB::readNodeFile("C:\\workspace\\osgEarthProject\\data\\world.tif");
osg::ref_ptr<osgEarth::MapNode> mapNodeE = MapNode::get(globeE);
osg::Group* rootE = new osg::Group();
rootE->addChild( mapNodeE );
viewerE->setSceneData(rootE);
viewerE->setCameraManipulator(new osgGA::FlightManipulator());
//viewer->addEventHandler(new osgViewer::StatsHandler);
viewerE->realize();
Other example I'm in the middle of looking at not sure which is the way to go
so feel free to let me know.
// graphics window embedded [x,y,w,h parameters don't seem to do anything??]
m_osg_winEmb = new
osgViewer::GraphicsWindowEmbedded(0,0,this->width(),this->height());
// sets the viewport as described here
http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml
// but (x=0 and y=0) correspond to (0,0) of the entire window and not just
our local item bounds
m_osg_viewer.getCamera()->setViewport(new
osg::Viewport(0,0,this->width(),this->height()));
m_osg_viewer.getCamera()->setGraphicsContext(m_osg_winEmb.get());
m_osg_viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded);
Thank you!
Cheers,
joey
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=61204#61204
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org