Re: [osg-users] Assigning one image to another

2009-08-26 Thread Ulrich Hertlein

Hi Brett,

On 25/08/09 10:00 PM, Brett Thomas Lee wrote:

Hi I also tried lots of methods like
img-setImage(64,64,1,GL_RGBA,GL_RGBA,GL_UNSIGNED_BYTE,rendTexture-getImage()-data(),osg::Image::NO_DELETE);


Are you rendering to 'rendTexture' (the name implies something like that).

The texture data isn't automatically read-back into the associated image but there are 
calls in osg::Image that can read the current texture.


Hope this helps,
/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Assigning one image to another

2009-08-26 Thread Trajce Nikolov
I believe the method is this one, but make sure to use it in proper place
/** Read the contents of the current bound texture, handling compressed
pixelFormats if present.
  * Create memory for storage if required, reuse existing pixel
coords if possible.
*/
void readImageFromCurrentTexture(unsigned int contextID, bool
copyMipMapsIfAvailable, GLenum type = GL_UNSIGNED_BYTE);

Nick

http://www.linkedin.com/in/tnikolov
Sent from Benoni, Gauteng, South Africa

On Wed, Aug 26, 2009 at 6:38 PM, Brett Thomas Lee brettle...@hotmail.comwrote:

 yes I have the same problem you have mentioned.Can you please be more
 specific about the methods in osg::Image please.

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=16755#16755





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Assigning one image to another

2009-08-25 Thread Tomlinson, Gordon
Have you tried ? 


Gordon
Product Manager 3d
__
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brett
Thomas Lee
Sent: Monday, August 24, 2009 11:07 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Assigning one image to another

Hi,

I want to assign one image to another another.I want to do deepcopy of
the image.does assigning image=image1; works??
Both images have same size and properties.

Thank you!

Cheers,
Brett

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16665#16665





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org