Hi , tried to set
osg Window over Blender one and failed at if (!::SetPixelFormat(_hdc, pixelFormatIndex, &pfd)) so I proceeded - setting as always ( taken from MFC example ) RECT rect; // Init the GraphicsContext Traits osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; HWND hwnd = GetActiveWindow(); // Init the Windata Variable that holds the handle for the Window to display OSG in. osg::ref_ptr<osg::Referenced> windata = new osgViewer::GraphicsWindowWin32::WindowData(hwnd,false); ::GetWindowRect(hwnd, &rect); // Setup the traits parameters traits->x = 0; traits->y = 0; traits->width =rect.right - rect.left; traits->height =rect.bottom - rect.top; traits->windowDecoration = false; traits->doubleBuffer = true; traits->sharedContext = 0; traits->setInheritedWindowPixelFormat = true; traits->inheritedWindowData = windata; /// Create the Graphics Context osg::GraphicsContext* gc = osg::GraphicsContext::createGraphicsContext(traits.get()); //fails at if (!::SetPixelFormat(_hdc, pixelFormatIndex, &pfd)) so to set FBO looks like not an option.... as context does not exist.... then returning to first approach ( in first mail, pbuffer route ) - I see - maybe somehow I need to play with makecurrent etc. But has it chance to succeed? Regards Sergey _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

