Hello Christian, On 2015-12-03 08:33, Christian Bar wrote: > What I get is a crash when I call > /externalVTKWidget->GetRenderWindow()->Render() /during the first render > (called in the glut display function). Such crash do no happen when I > use vtk and glut, withouth OpenSG. > The crash is caused because vtk internally calls > /glGetString(GL_VERSION)/, and this returns null, which obviously is an > error. BTW, if I call /glGetString(GL_VERSION) /BEFORE > /GLUTWindow->init()/, it returns the correct string ("4.5.0 NVIDIA > 348.07"). Is glew somehow related to this? I thought that /GLUTWindow > /already calls the /wglMakeCurrent/ (and related stuff), so I should > already have a valid OpenGL context... > BTW (again), /glGetString(GL_VERSION) /always return null after a > /GLUTWindow->init()/, even if I do not use VTK.
the OpenSG windows only activate the GL context for the duration of the rendering and deactivate it when done, so anything outside of Window::render() typically does not have an active GL context. You should be able to surround your additional rendering with GLUTWindow::activate()/deactivate() calls to get access to the context. > Now, the real question is: do I have to build OpenSG and VTK in a way > that makes them compatible? What are the CMAKE options that manage this? > Has anyone ever tried to mix OpenSG and VTK? > My machine runs Windows 8 and I am building the application with Visual > Studio 2010 x64. I don't think any additional care beyond the normal windows requirement not to mix debug/release libs is needed - but I haven't tried it. Cheers, Carsten ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users