Hi Robert, thanks for the quick response. We (Raymond de Vries [see earlier mails about ImageStream] and I) are working on video-streaming textures where the size of the texture can change dynamically. From the image-stream class we only have access to the image, not to the texture. However you have created a nice mechanism that allows us to dirty the image (edit or resize) and that will trigger the texture to update automatically.
Unfortunately for some (perhaps very well considered) reason, the texture will always keep its original size and will rescale the image to fit in it. This will use a lot of CPU-time if each video-frame is resized and has some other disadvantages I mentioned before. Do you know why the texture-size is left unchanged? Michel -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: donderdag 10 augustus 2006 10:52 To: osg users Subject: Re: [osg-users] Dynamically changing image-sizes (used by a texture) Hi Michel, Why not create multiple osg::Texture, one for each image. Robert. On 8/10/06, Elk, M.G. (Michel) van <[EMAIL PROTECTED]> wrote: > LS, > > I'm trying to dynamically change the size of a texture so I can put > different images (with different resolutions) on an object. I'm doing > this by updating the image that is used by the texture (calling > Image::setImage with the updated > information) > > When the dimensions of the image change the texture resizes the > content of the image to fit the current texture-size. Then it uploads > the resized image using the glTexImage2D command. > > This means that: > - if your new image is smaller it is scaled up which takes time and > uses more > texture memory than it should > - if your new image is bigger it is scaled down, this takes time and > decreases > quality > > Shouldn't it be better to create a new texture using the new image > dimensions? > > Kind regards, > > Michel van Elk > TNO Science & Industry > The Netherlands > > This e-mail and its contents are subject to the DISCLAIMER at > http://www.tno.nl/disclaimer/email.html > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
