Hi Pumipat, My suggestion is to use OSG-2.9.10 or svn/trunk, as this wouldn't require you to change any of your code, just compile against the latest dev version of the OSG.
Failing this have a look at the osgconv example as it has a code path for creating a graphics context for the purpose of doing image processing use GL and GLU functions. Robert. On Mon, Feb 21, 2011 at 5:40 PM, Pumipat Doungklang <[email protected] > wrote: > HI Robert > > How I can use osg::Image::scaleImage() with a valid graphics context. > Could you give me some suggestion or example. > > Best regards, > > Phummipat > > > On Mon, Feb 21, 2011 at 5:36 PM, Robert Osfield > <[email protected]>wrote: > >> Hi Phummipat, >> >> The osg::Image::scaleImage() function in OSG-2.8.x and before relies >> upon GLU library's gluScaleImage which requires a valid graphics >> context to run and will generate errors or crash when called without a >> valid graphics context being current. >> >> In the latest OSG dev releases and svn/trunk we have moved to use an >> internal GLU library rather than an external one like before, and this >> internal GLU is modified to all ScaleImage functionality that doesn't >> require a graphics context to run, so your type of usage will work >> just fine. Please try svn/trunk or OSG-2.9.10. >> >> Robert. >> >> On Mon, Feb 21, 2011 at 3:01 PM, Pumipat Doungklang >> <[email protected]> wrote: >> > Hi everyone, >> > >> > I try to scale image by using scalImage function in class Image but it >> > always return out of memory. >> > I try to read old mailing list but I don't understand. Could someone >> tell me >> > what wrong with my code below. >> > >> > >> > #include<osg/Image> >> > #include<osgDB/ReadFile> >> > #include<osgDB/WriteFile> >> > >> > int main(int,char **) >> > { >> > osg::ref_ptr<osg::Image> image = osgDB::readImageFile("Sunset.bmp"); >> > image->scaleImage(256,256,1); >> > return 0; >> > } >> > >> > >> > thank you very much. >> > //Phummipat >> > >> > _______________________________________________ >> > osg-users mailing list >> > [email protected] >> > >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > >> > >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

