On 17/7/09 6:14 PM, Brad Huber wrote:
Does anyone know of a good way to modify pixels in a texture at runtime
w OSG?
Basically I’m looking for a way for the user to select an arbitrary
color to be used on an airplane or similar. EG ability to switch to any
color as in the attached image.
From what you're saying it sounds like you really only need to modify the object base
colour, using one of the techniques that Jason suggested.
If you *really* want to modify individual pixels in a texture you can use Image::data() to
get a pointer to the image data and modify that directly. It might be a bit tricky since
you have to take the Image format into account. Call Image::dirty() when you're done with
the modification to upload the new data to the texture.
Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org