---------- Forwarded message ---------- From: Robert Osfield <[EMAIL PROTECTED]> Date: Aug 20, 2007 5:02 PM Subject: Re: [osg-users] Color vs. B&W images as textures To: Yefei He <[EMAIL PROTECTED]>
Hi Yefei, I don't have available time to investigate right now, but I can suggest you look at src/osg/Texture2D.cpp and src/osg/Texture.cpp for the code that uploads the imagery to the OpenGL texture objects. In the case of the format change this would need to be detected and a new OpenGL object created rather than the old one reused, this would probably be quite a straight forward change as there is already code in place to force a new texture object in case like dimension changes. Robert. On 8/20/07, Yefei He <[EMAIL PROTECTED]> wrote: > Hi, Robert, > > Attached are two jpeg files. I have verified that the jpeg loader > identifies the file "blank.gray.jpg" to have internalFormat and > pxielFormat of GL_LUMINANCE, and the file "blank.color.jpg" to be > GL_RGB. The former image causes all subsequent images to show up as > gray scale when they are applied to the texture. > > Yes, I'm reusing a Texture2D by applying new images to it. I'm > sort of doing a slide show, so I just create a rectangle with a 2D > texture, where new images are being applied to it as time goes on. > > Best Regards, > > Yefei > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:osg-users- > > [EMAIL PROTECTED] On Behalf Of Robert Osfield > > Sent: Saturday, August 18, 2007 10:25 AM > > To: [email protected] > > Subject: Re: [osg-users] Color vs. B&W images as textures > > > > Do mean you are reusing a Texture by applying new Images to it? > > > > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

