Brett Thomas Lee wrote:
Hi,
Thank you for the reply jason.Theres no triangle there.I just have four pixel
coordinates and its a rectangle.I want to update the texture after filling the
rectangle with some color thats it.I can do this by some thing similar to
glTexSubImage2D but the rectangle may be in a rotated state(i.e its edges wont
be parallel to height and width of the texture)
I think I follow, given the four corners of a rectangle in tangent (ie.
texture coordinate) space, you want to fill the region of the texture
enclosed by the rectangle with color.
How about this... Set up a pre-render camera that will render to a
texture (via an FBO). Set up an orthographic projection. Draw the
texture in question on a full-screen quad. Then, draw the rectangle
with the color you need on top of it. Then, you can do whatever you
want with the texture image.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org