On Fri, May 15, 2009 at 3:34 PM, Jason Daly <[email protected]> wrote:
> Jean-Sébastien Guay wrote:
>>
>> If there *is* a special format for a cube map contained in a .dds file,
>> perhaps the OSG .dds loader doesn't handle it correctly? I don't know, but
>> you could investigate by checking the code. Again, perhaps someone else has
>> more insight into this.
>>
>
> DDS files can contain multi-surface images, including cube maps.  The
> problem is that there is currently no Image class in OSG that will hold a
> cube map, so there is no way for the .dds plugin to return a cube map.

Indeed there isn't a osg::Image class that does cube maps yet.

I have been pondering on this issue for a quite while as this topic
does occasionally come up.  The way to tackle is to have an
osg::CompositeImage/ImageList/ImageArray subclass from osg::Image that
provides a list of images that can be assigned to a osg::Texture.
One would want to scoop up the needs of the texture array support at
the same time.

Ideally we'd have an ImageBase class rather than subclassing from
Image or refactor Image so it's a base class, and then have concrete
implementations subclass from this.  It's kinda awkward to undertake
such a refactoring now though.

A template for an ImageArray class could be the ImageSequence class
that already holds a list of images internally.  Others are welcome to
dive in an add this ImageArray class ;-)

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to