[osg-users] ShadowTexture::setTextureSize?
Thanks to J-S and the others who have filled in the osgshadow documentation, it is really starting to come together. Question of the day: I find a setTextureSize method on ShadowMap and SoftShadowMap, but not on the 3 other techniques (even in SVN head). In particular ShadowTexture has code like this: unsigned int tex_width = 512; unsigned int tex_height = 512; ... But no setTextureSize method. So it seems like it would be very easy to add it. Is there some technical reason it's not there, or just an oversight? If oversight, may i implement and submit it? -Ben ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ShadowTexture::setTextureSize?
Hi Ben, On Wed, May 14, 2008 at 8:28 AM, Ben Discoe [EMAIL PROTECTED] wrote: But no setTextureSize method. So it seems like it would be very easy to add it. Is there some technical reason it's not there, or just an oversight? If oversight, may i implement and submit it? The various ShadowTechniques have been developed independently by different authors, and have been subject to different contribution since their inception so differences have grown up between them - some a natural part of their differing implementation details, others simply down to features being added to some but not others that could be equally served by it - ShadowTexture::setTextureSize being one of them. If you spot these inconsistencies please just highlight them, and even better if you can do it implement the missing feature ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ShadowTexture::setTextureSize?
Hi Ben, Question of the day: I find a setTextureSize method on ShadowMap and SoftShadowMap, but not on the 3 other techniques (even in SVN head). In addition to what Robert said, I'll add that setTextureSize is only relevant to texture-based shadow techniques, so for example it makes no sense for ShadowVolume to have one. So you couldn't just move setTextureSize to the parent class osgShadow::ShadowTechnique. There could be a split into two subclasses of ShadowTechnique above the actual concrete techniques, something like: ShadowTechnique TextureShadowTechnique (find a better name...) ShadowTexture ShadowMap SoftShadowMap ParallelSplitShadowMap LightSpacePerspectiveShadowMap (one can only wish... :-) ) GeometryShadowTechnique ShadowVolume (any others?) That would avoid duplicating setTextureSize, and maybe some others? Perhaps for such a simple method it's not that useful though. We could also have a virtual setTextureSize in ShadowTechnique and make it throw an exception (or print a message) if it's called for ShadowVolume, since it's currently the only non-texture-based technique. 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