[osg-users] Problem with current OSG and OSX
Hi, All, I am wondering if anyone else is having the same issues as me with OSX. When I build the current OSG (as of Dec. 23rd) I cannot get any of the examples or anything to run. On the latest 3.4 build it works great... on the current build it works great on my Windows machine. Only on my OSX machines am I running into this issue. 2013 MacBook Air and 2016 MacBook Pro both have the issue so I am not sure if it is an isolated graphics card thing. They are both running Sierra though and Xcode 8.2. Back to the errors, when I run the osgcallback example, I get this: share/OpenSceneGraph/bin/osgcallback ; exit; before readNode after readNode ViewerBase::configureAffinity() numProcessors=8 databasePagers = 1 New Frame _forceVertexArrayObject = 0 _forceVertexBufferObject = 0 Camera event callback - pre traverse0x7fc3b650ee60 Camera event callback - post traverse0x7fc3b650ee60 update callback - pre traverse0x7fc3b654b010 update callback - pre traverse0x7fc3b654b0f0 Drawable update callback 0x7fc3b654b1f0 update callback - post traverse0x7fc3b654b0f0 update callback - post traverse0x7fc3b654b010 Camera update callback - pre traverse0x7fc3b650ee60 Camera update callback - post traverse0x7fc3b650ee60 cull callback - pre traverse0x7fc3b654b010 Drawable cull callback 0x7fc3b654b1f0 cull callback - post traverse0x7fc3b654b010 Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile draw call back - pre drawImplementation0x7fc3b654b1f0 draw call back - post drawImplementation0x7fc3b654b1f0 Warning: detected OpenGL error 'invalid operation' at After Renderer::compile draw call back - pre drawImplementation0x7fc3b654b1f0 draw call back - post drawImplementation0x7fc3b654b1f0 Warning: detected OpenGL error 'iWarning: detected OpenGL error 'iWarning: detected OpenGL error 'iWarning: detected OpenGL error 'invalid operation' at end of SceneView::draw() Camera event callback - pre traverse0x7fc3b650ee60 Camera event callback - post traverse0x7fc3b650ee60 update callback - pre traverse0x7fc3b654b010 update callback - pre traverse0x7fc3b654b0f0 Drawable update callback 0x7fc3b654b1f0 update callback - post traverse0x7fc3b654b0f0 update callback - post traverse0x7fc3b654b010 Camera update callback - pre traverse0x7fc3b650ee60 Camera update callback - post traverse0x7fc3b650ee60 cull callback - pre traverse0x7fc3b654b010 Drawable cull callback 0x7fc3b654b1f0 cull callback - post traverse0x7fc3b654b010 Warning: detected OpenGL error 'invalid operation' at start of State::apply(StateSet*) Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0xc60 Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0xc61 Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0xde1 Warning: detected OpenGL error 'invalid operation' after applying attribute TexGen 0x7fc3b654c530 Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0xb50 Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0x4000 Warning: detected OpenGL error 'invalid operation' after applying attribute Material 0x7fc3b654b790 Warning: detected OpenGL error 'invalid operation' after applying attribute LightModel 0x7fc3b6513ce0 draw call back - pre drawImplementation0x7fc3b654b1f0 Warning: detected OpenGL error 'invalid operation' at start of Geometry::drawImplementation() Warning: detected OpenGL error 'invalid operation' at Geometry::drawImplementation() after vertex arrays setup. Warning: detected OpenGL error 'invalid operation' at end of Geometry::drawImplementation(). draw call back - post drawImplementation0x7fc3b654b1f0 Warning: detected OpenGL error 'invalid operation' at start of State::apply() Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0xc60 Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0xc61 and it continues like that for every frame... would love to help out to get this problem fixed if anyone can point me in the right direction. Cheers, Steve -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69814#69814 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Tearing hair out over simple GLSL instancing
Yup that's what I found I had to do . I created a fragment shader and did the basic lighting. I assume I could do that in the vertex shader as well. Thanks for confirming. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69809#69809 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] wireframe mode and degenerate triangles
Hi all, I have just optimized a human model that had around 150 individual GL_LINE_STRIP drawables by adjoining these. This requires doubling the last vertex of a strip and the first vertex of the next strip which is to be appended, generating a couple of degenerate triangles. The model still renders fine and the OSG stats viewer now shows a much lower drawable count. A quirk appears when rendering this in wireframe mode (using the 'w' hotkey implemented in one of the builtin Event handlers). I assume this enables a GL PolygonMode of GL_FRONT_AND_BACK, GL_LINE. Now the degenerate triangles are still rendered, making the model look broken (arms look fused to the body). Here's my question: Shouln't wireframe rendering mode hide degenerate triangles, as they wouldn't be passed on to the rasterizer in any case? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Master renders with OpenGL error on OSX
Hi guys, Any luck on finding out what is causing this error? I am also getting it out on my 2016 MacBook Pro running OSX Sierra when compiling the latest Dec. 23rd commit. No problem on my Windows machine. I also tried compiling on my 2013 MacBook Air with the same results and errors. I did not have it when I was using OSG3.4. In addition to this: Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) That comes up continuously over and over again in my compile output, I also get this: dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. NSt3__115basic_streambufIcNS_11char_traitsIc, N3osg18NotifyStreamBufferE. Not sure if this has something to do with it. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69807#69807 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] mygui integration (for Wang Rui)
Привет, Денис. GLUT в OpenSceneGraph так никто не использует. Если он тебе действительно нужен, смотри пример examples/osgviewerGLUT. Удачи! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69806#69806 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Tearing hair out over simple GLSL instancing
Does your vertex shader code perform any lighting calculations? I remember that in my instancing vertex shader code I had to explicitly perform required lighting calculations for ambient, diffuse, specular components (the usual Blinn-Phong lighting equations) and set the vertex colors accordingly. Christian 2016-12-29 22:23 GMT+01:00 Andrew Cunningham: > Hi guys, > Can you help me out with this one more time:) > > As I said, I am now able to draw my geometry ( a simple square) using > hardware instancing. It works perfectly with excellent performance for > millions of squares- except for one thing. > > Now I want to light the squares. I have turned on lighting, assigned a > normal array to the geometry being instanced and assigned material colors, > but I get unlit 'black squares' while the rest of my scene is lit just > fine. Clearly something to do with hardware instancing using the vertex > shader. > > Do I need to add a fragment shader? I am a bit lost here. > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69801#69801 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] mygui integration (for Wang Rui)
Hi, I still do not understand. I'm just getting started with OSG and therefore me a lot of things about escapes. I keep showing either no GUI. My wrapper MyGUI is osgRecipies. Here is my code of the main features: Code: int main( int argc, char **argv ) { glutInit(, argv); osg::ref_ptr loadedModel = osgDB::readRefNodeFile(CREATE_PATH(assets/robot.osg)); if (!loadedModel) { std::cout "No data loaded." << std::endl; return 1; } glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_ALPHA ); glutInitWindowPosition( 100, 100 ); glutInitWindowSize( 800, 600 ); glutCreateWindow( argv[0] ); glutDisplayFunc( display ); glutReshapeFunc( reshape ); glutMouseFunc( mousebutton ); glutMotionFunc( mousemove ); glutKeyboardFunc( keyboard ); osg::ref_ptr root = new osg::Group; root->addChild( loadedModel.get() ); osg::ref_ptr mygui = new CustomMYGUIManager; mygui->setResourcePathFile(std::string("/home/denis/Veřejné/Dropbox/Projects/wall/assets/ui/default/resources.xml")); osg::ref_ptr geode = new osg::Geode; geode->setCullingActive( false ); geode->addDrawable( mygui.get() ); geode->getOrCreateStateSet()->setMode( GL_BLEND, osg::StateAttribute::ON ); geode->getOrCreateStateSet()->setRenderingHint( osg::StateSet::TRANSPARENT_BIN ); geode->getOrCreateStateSet()->setRenderBinDetails(1000,"RenderBin"); osg::ref_ptr camera = new osg::Camera; camera->setReferenceFrame( osg::Transform::ABSOLUTE_RF ); camera->setRenderOrder( osg::Camera::POST_RENDER ); camera->setAllowEventFocus( false ); camera->setProjectionMatrix( osg::Matrix::ortho2D(0.0, 1.0, 0.0, 1.0) ); camera->addChild( geode.get() ); camera->setClearMask(0); root->addChild( camera.get() ); viewer = new osgViewer::Viewer; viewer->setSceneData( root.get() ); viewer->addEventHandler( new MYGUIHandler(camera.get(), mygui.get()) ); viewer->addEventHandler( new osgViewer::WindowSizeHandler ); viewer->addEventHandler( new osgViewer::StatsHandler ); window = viewer->setUpViewerAsEmbeddedInWindow(0,0,800,600); viewer->setCameraManipulator(new osgGA::TrackballManipulator); viewer->realize(); glutMainLoop(); return 0; } He knew how would you advise someone please ... Thanks for google translater ... Thank you! Cheers, Denis -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69778#69778 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org