Re: [osg-users] RE : Re: RE : multitexturing coordinates
Hello Franclin, But for shape drawable, geometry information is hidden to clients (and I don't know why but I suspect performance issues) that is why you need to use shaders for them. Well actually the Shape / ShapeDrawable classes were originally designed as simple debugging tools, so little thought was put into their design. They're just implemented as simple display lists with little customization possible, and no access to the internals. If you want to do any serious geometry with any acceptable level of control, you'll want to use osg::Geometry and define the vertices yourself. One side of the coin: --- I had suggested to Robert that I could reimplement the Shape / ShapeDrawable classes using an underlying osg::Geometry, so that they would behave as they do now but offer more control if needed (probably as it should have been done right from the beginning). He was open to this, but I haven't had time to do it yet. The other side of the coin: - Do you know how easy it is to download Blender, create a sphere, save it and load it up with OSG? And when you do, it will be a full-fledged osg::Geometry and you will have total control over it. If you use the osg exporter for Blender you can even edit the .osg file and make sure it's structured exactly how you want it. I generally favor using data for everything (as much as possible / reasonable) as opposed to hard-coding things, since later it's much easier to replace the sphere model by something else if it's a model file than if I have to open the project, find the relevant code, change it, compile it, test it... This is just my opinion though, and the Shape / ShapeDrawable classes still have uses, which is why I still want to do what I mentioned above, someday. :-) Hope this clears things up. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RE : Re: RE : multitexturing coordinates
Hi Franclin, yes shaders is better.. . but I wanted to solve this using old multitexturing method. I have succesfully done this and it works just fine on my quad (which of course if from the geometry class). doing it using a shader is not a problem (actually easier for me).. but like I said I purposely wanted to use the above method without shaders. regards, Peter On Fri, Jul 11, 2008 at 12:00 AM, Franclin Foping [EMAIL PROTECTED] wrote: Hi Peter, You can achieve a multitexture effect quite easily again look at my tutorials. The problem is all about defining the geometry of objects yourself and in order to do this you will need to rely on the geometry class. But for shape drawable, geometry information is hidden to clients (and I don't know why but I suspect performance issues) that is why you need to use shaders for them. Because by making use of shaders you are actually changing the graphics pipeline. Talk to you soon. F. *Jason Daly [EMAIL PROTECTED]* a écrit : Peter Wraae Marino wrote: Hi Franclin, Yea doing it using a shader is easier and more flexible, but is there a reason why we don't get access to do multitexture coordinates? Jasons suggestion: osg::Geometry::setTexCoordArray() is not for multitexture coordinates, so I can't really use that. I use it for multitexture coordinates all of the time. Why would you think it doesn't work? --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Envoyé avec Yahoo! Mailhttp://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html . Une boite mail plus intelligente. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org