[osg-users] Need help using glTexSubImage2D

Robert Osfield robert.osfield at gmail.com
Tue Mar 24 11:04:47 PDT 2009

Hi Luis,

Just call dirty on the Image and it'll get automatically uploaded.

For non power of two images simple use osg::TextureRectangle or a
osg::Texture2D's non power of two texture support.  Please see the osgmovie


On Tue, Mar 24, 2009 at 5:52 PM, Luis Rodriguez
<luis.rodriguez at teligy.com>wrote:

> Thanks Robert. A couple more questions. How do I guarantee that only the
> changed pixels are uploaded? The source image I'm using is 640x480. To
> maximize compatibility, I need to make texture sizes a power of 2 and square
> right?  That sets the next available size at 1024x1024. That's alot of extra
> data to copy.
> If I accessing the Image via the data()  method then there's no way to
> specify the dimensions of the dirty rectangle. I see that copySubImage takes
> a rectangle but the source for copy is an Image object so I'd have to copy
> the image data twice (camera -> tempImage ->texture). Is there something I'm
> missing? Perhapse I should call glTexSubImage2D directly? [/quote]
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=9121#9121
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090324/b5d905cf/attachment-0003.htm>

More information about the osg-users mailing list