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

