Re: [osg-users] iOS: wireframe
I think it could be useful in many other scenarios, regarding the current one, at last, requirements changed so I had not to use wireframe anymore. If you don't mind it would be great to have the chance to try it. By the way, is your implementation intended for GLES? Thanks. Alessandro On Fri, Sep 2, 2011 at 9:48 PM, Jeremy Moles jer...@emperorlinux.com wrote: On Fri, 2011-09-02 at 18:11 +0200, Alessandro Terenzi wrote: Ok and thanks for your help. I think I might finish my own personal solid+wireframe GLSL example here in a few minutes. Would this be of use to you? (It is derived from this example: http://www2.imm.dtu.dk/~jab/Wireframe/ Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42387#42387 ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] iOS: wireframe
Hi, I'd like to set the visualization mode to wireframe on iOS, I use these instructions: Code: osg::ref_ptrosg::StateSet ss = myModelNode-getOrCreateStateSet(); osg::ref_ptrosg::PolygonMode pm; pm = new osg::PolygonMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE); ss-setAttributeAndModes(pm.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); but when the app is running and 'myModelNode' is shown, I keep getting this warning: ... Warning: PolygonMode::apply(State) - not supported. ... and, of course, the model is drawn as if it is NOT in wireframe. Am I doing something wrong? Is really PolygonMode not supported on iOS? If so, how can I change to wireframe mode? Thanks for your help. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42375#42375 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: wireframe
On 9/2/2011 2:11 AM, Alessandro Terenzi wrote: Hi, I'd like to set the visualization mode to wireframe on iOS, I use these instructions: Code: osg::ref_ptrosg::StateSet ss = myModelNode-getOrCreateStateSet(); osg::ref_ptrosg::PolygonMode pm; pm = new osg::PolygonMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE); ss-setAttributeAndModes(pm.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE); but when the app is running and 'myModelNode' is shown, I keep getting this warning: ... Warning: PolygonMode::apply(State) - not supported. ... and, of course, the model is drawn as if it is NOT in wireframe. Am I doing something wrong? Is really PolygonMode not supported on iOS? If so, how can I change to wireframe mode? I suspect glPolygonMode is not supported in any flavor of OpenGL ES. http://www.khronos.org/opengles/ ...but you should check the spec. You could change to wireframe mode using a switch and a second scene graph that renders your geometry as lines. I don't know of an automated way to create such a scene graph; you might have to write a NodeVisitor to create that for you. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: wireframe
On 09/02/2011 08:56 AM, Paul Martz wrote: I suspect glPolygonMode is not supported in any flavor of OpenGL ES. http://www.khronos.org/opengles/ ...but you should check the spec. Paul's right. I checked the spec. glPolygonMode is not supported by OpenGL ES. That was a surprise to me as well. It is still part of the core profile in OpenGL 3.1 and higher. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: wireframe
Ok and thanks for your help. Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42387#42387 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: wireframe
On Fri, 2011-09-02 at 18:11 +0200, Alessandro Terenzi wrote: Ok and thanks for your help. I think I might finish my own personal solid+wireframe GLSL example here in a few minutes. Would this be of use to you? (It is derived from this example: http://www2.imm.dtu.dk/~jab/Wireframe/ Cheers. Alessandro -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42387#42387 ___ 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