Hi Lahiru I use the attached code when converting from wxImage to osg::Image. The code is slightly modified to be independent from my project, but should be a good starting point.
You might very well rethink how wxImageHandlers are created (i.e. if you call wxInitAllImageHandlers() at the beginning of your program, you are guaranteed that you don't need to install them on the fly, and can get rid of the initialization thingy with the mutex) Hope this helps Cheers Thibault On Mon, Sep 27, 2010 at 5:56 PM, Lahiru Lakmal <[email protected]> wrote: > Hi all, > > I am trying to create a wxImage (bitmap) in runtime using wxMemoryDC, draw a > gradient rect on it and apply the bitmap as a texture on a QUAD. > > But I still couldn't find a proper way to convert the proceed wxImage (with > gradient) into a osg:Image. > > I really appreciate if you can help me with this. > > Thank you! > Best Regards, > Lahiru > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=32104#32104 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
ImageConverter.h
Description: Binary data
ImageConverter.cpp
Description: Binary data
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

