Robert, Yes, that was one of my thoughts too, but in that case we need to add support for handling mipmap levels per depth level.
Roland > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Robert Osfield > Sent: vrijdag 28 september 2007 9:26 > To: OpenSceneGraph Submissions > Subject: Re: [osg-submissions] DDS cubemap support > > Hi Roland, > > I'm only online briefly before I head out on the school run. > My first quick though is that rather than having 4 parameters > in your extended > data() method we should just treat the 3d image layer as the face. > The reason why we can do this is that texture cube maps can't > be 3d textures and visa versa. > > Once I get back I'll do a proper review. > > Robert. > > On 9/28/07, Smeenk, R.J.M. (Roland) <[EMAIL PROTECTED]> wrote: > > > > > > A couple of weeks ago I decided to make a minor modification to the > > dds reader for supporting cubemaps. > > This quickly turned into a somewhat larger modification > than I expected. > > > > Here's a list of the things I changed: > > > > -osg::Image Supports for multiple data faces > > (including possible mipmaps) > > -osg::Texturecubemap Collapsed image array inside into > a single image > > with 6 faces > > -osg::Texture Added face as parameter > to apply methods > > -osgUtil::cubemapgenerator Now using single 6 face image > > -osgFX::specularhighlights Now using single 6 face image > > > > -dds plugin > > -loading a cubemap into an 6 face image > > -writing a 6 face image as cubemap > > > > -osg plugin > > -loading new style cubemaps > > -loading old style cubemaps with automatic conversion > to new style > > cubemap > > -writing new style cubemaps > > > > -ive plugin > > -loading new style cubemaps > > -loading old style cubemaps with automatic conversion > to new style > > cubemap > > -writing new style cubemaps > > > > -osgcubemap example Now using a single 6 face image > > -osgvertexprogram example Now using a single 6 face image > > > > I tried to keep the impact of the interface changes a low > as possible > > by using default parameters. However this is dangerous in > some cases. > > This is especially the case with osg::Image::data() which > exists in two variants: > > inline unsigned char* data(unsigned int face) inline unsigned char* > > data(int column, int row=0, int image=0, unsigned int > > face=0) > > > > For accessing specific face data you will have to > explicitly set it to > > an unsigned int to end up using the correct method. > > unsigned char* facedata = data((unsigned int)2); > > > > Possible future additions related to these changes are: > > -Convert TextureArray to using a multiple face image, but > there exists > > no multiface image format that I know of. > > -.hdr loader support for cubemap loading/writing > -Cubemapgenerator for > > converting a cross image into a cubemap (with configurable face > > layout) > > > > kind regards, > > > > Roland Smeenk > > > > > > This e-mail and its contents are subject to the DISCLAIMER at > > http://www.tno.nl/disclaimer/email.html > > > > _______________________________________________ > > osg-submissions mailing list > > [email protected] > > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscene > > graph.org > > > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-o > penscenegraph.org > This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
