[osg-users] RE : Re: Loading a 3D texture with osgDB::ReadFile method

Robert Osfield robert.osfield at gmail.com
Wed Jul 16 15:08:30 PDT 2008


Hi Franclin,

Please look at the osgtexture3D example, it textures polygon using a
3D texture, but treated like a 2D texture.

Robert.

On Wed, Jul 16, 2008 at 10:57 PM, Franclin Foping <fsfoping at yahoo.fr> wrote:
> Dear Robert,
>  Thank for your reply. Unfortunately that is not what I want to do.
>  I was wondering if there is a way to extract each slice in a 3D texture.
>  For instance, if I have a 3D texture made of 256 slices of 2D textures. My
> question was to be able to retrieve these 2D textures and apply them on a
> geometry.
>  I hope to have clarify the matter.
>  Waiting for your reply.
>  Franclin.
>
> Robert Osfield <robert.osfield at gmail.com> a écrit :
>
> Hi Franclin,
>
> You simple do:
>
> osg::ref_ptr image = osgDB::readImageFile("my3dtexture.dds");
>
> Then apply this image to your osg::Texture3D as you would any other texture.
>
> Robert.
>
> On Wed, Jul 16, 2008 at 2:15 PM, Franclin Foping wrote:
>> Dear All,
>> I am just wondering if it is possible to load a 3D
>> texture with the osgDB::ReadFile method?
>> I would like to be able to use the Data() method
>> of the Image class to retrieve the data of the 3D
>> texture for each stack of the texture. Is it
>> possible? Or is there is any way around it?
>> I am looking forward to hearing from you.
>> Regards,
>> Franclin.
>>
>>
>>
>> _____________________________________________________________________________
>> Envoyez avec Yahoo! Mail. Une boite mail plus intelligente
>> http://mail.yahoo.fr
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ________________________________
> Envoyé avec Yahoo! Mail.
> Une boite mail plus intelligente.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>



More information about the osg-users mailing list