On 6/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Thanks for the advice,
After implementing it, I encountered 3 problems:
1. There are minor differences of the data values between the two
implementations (reading from the current texture, and attaching image)
maybe images doesn't support half float precision?

There is some half float support in the 2.0 version of osg::Image, but
this might not coverage your usage.

2. The image was rescaled to power of 2. (300x300 ---> 256x256) while
textures sizes don't have to be power of two. (is there a way to define
image that won't be a power of 2 and attach it to the FBO?)

What makes you think the images are rescaled to a power of two when
reading?  There isn't any such code.  There only code for rescaling to
power of two happens when applying on non power of two image to a
power of two texture.  Note the OSG support non power of two texture
where supported by OpenGL drivers, but by default this is switched off
due to portability problems related to OpenGL driver saying non power
of two is supported, but then implementing it in software...

See osg::Texture::setResizeNonPowerOfTwoHint(bool);

3. It run slower than binding the texture object and reading from current
texture.

It shouldn't run slower, if it is then there is possible some issue
along the way such as pixel formats being inconsistent.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to