Hi, Thanks you for your answer.
I don't understand what you mean with glcontext. in osgviewer.cpp I have append 2 lines in function /* Show the frame */ frame->Show(true); GLubyte *verGl=(GLubyte*)glGetString(GL_VERSION); HGLRC WINAPI wwww=wglGetCurrentContext(); return true; verGL is NULL and wwww is NULL too. Thread model is debug. With other examples without wxWidgets (osgGlviewer cessna.osg) everything is OK. After violation exception stack is > msvcr90d.dll!strncmp(const char * first=0x00000000, const char * > last=0x1055db10, unsigned int count=3) Ligne 81 + 0x3 octets C osg80-osgd.dll!osg::LightModel::apply(osg::State & __formal={...}) Ligne 61 + 0x3d octets C++ osg80-osgd.dll!osg::State::applyAttribute(const osg::StateAttribute * attribute=0x025d0dc0, osg::State::AttributeStack & as={...}) Ligne 1596 + 0x13 octets C++ osg80-osgd.dll!osg::State::applyAttributeList(std::map<std::pair<enum osg::StateAttribute::Type,unsigned int>,osg::State::AttributeStack,std::less<std::pair<enum osg::StateAttribute::Type,unsigned int> >,std::allocator<std::pair<std::pair<enum osg::StateAttribute::Type,unsigned int> const ,osg::State::AttributeStack> > > & attributeMap=[7](((MATERIAL,0),{changed=true last_applied_attribute=0x0260a048 last_applied_shadercomponent=0x00000000 ...}),((LIGHT,0),{changed=false last_applied_attribute=0x025c85d8 last_applied_shadercomponent=0x00000000 ...}),((SHADEMODEL,0),{changed=true last_applied_attribute=0x0260a720 last_applied_shadercomponent=0x00000000 ...}),...,...), const std::map<std::pair<enum osg::StateAttribute::Type,unsigned int>,std::pair<osg::ref_ptr<osg::StateAttribute>,unsigned int>,std::less<std::pair<enum osg::StateAttribute::Type,unsigned int> >,std::allocator<std::pair<std::pair<enum osg::StateAttribute::Type,unsigned int> const ,std::pair<osg::ref_ptr<osg::St ateAttribute>,unsigned int> > > > & attributeList=[2](((MATERIAL,0),({_ptr=0x0260a048 },0)),((SHADEMODEL,0),({_ptr=0x0260a720 },0)))) Ligne 2324 C++ osg80-osgd.dll!osg::State::apply(const osg::StateSet * dstate=0x02606af8) Ligne 508 C++ osg80-osgUtild.dll!osgUtil::RenderLeaf::render(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * previous=0x00000000) Ligne 74 + 0x17 octets C++ osg80-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x00000000) Ligne 479 + 0x19 octets C++ osg80-osgUtild.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x00000000) Ligne 1398 C++ osg80-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x00000000) Ligne 424 + 0x17 octets C++ osg80-osgUtild.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x00000000, bool & doCopyTexture=false) Ligne 933 C++ osg80-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo & renderInfo={...}, osgUtil::RenderLeaf * & previous=0x00000000) Ligne 1237 + 0x1b octets C++ osg80-osgUtild.dll!osgUtil::SceneView::draw() Ligne 1443 + 0x37 octets C++ osg80-osgViewerd.dll!osgViewer::Renderer::cull_draw() Ligne 842 + 0xf octets C++ osg80-osgViewerd.dll!osgViewer::Renderer::operator()(osg::GraphicsContext * context=0x025c3528) Ligne 888 + 0xf octets C++ osg80-osgd.dll!osg::GraphicsContext::runOperations() Ligne 756 + 0x33 octets C++ osg80-osgViewerd.dll!osgViewer::ViewerBase::renderingTraversals() Ligne 807 + 0x15 octets C++ osg80-osgViewerd.dll!osgViewer::ViewerBase::frame(double simulationTime=1.7976931348623157e+308) Ligne 645 + 0xf octets C++ osgviewerWXd.exe!MainFrame::OnIdle(wxIdleEvent & event={...}) Ligne 119 + 0x2c octets C++ Cheers, Laurent ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42488#42488 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org