Hi Robert, The Image::scaleImage methods used to use the standard GLU which requires a valid graphics context to be current, if you call it without a valid graphics context it will likely crash in GLU.
The svn/trunk and 2.9.10 onwards versions of the OSG use an internal version of GLU which has been modified so that it doesn't require a graphics context when doing the scale routines, this means that the Image copy and scaling functions no longer require a valid graphics context to work. So... for you the fix is probably to just use the latest dev release or svn/trunk of the OSG rather than the previous stable release. Robert. On Wed, Feb 16, 2011 at 10:28 PM, Robert Pardridge <[email protected]> wrote: > Hi, > I am trying to create a 3D texture from multiple jpegs as in the texture3D > example, however my program is segfaulting at calls to scaleImage() and > copySubImage() and I have no idea why. The test picture right now is 512x512, > however I do need to eventually rescale pictures that are 1024x768. Here is > my code: > > Image * test = osgDB::readImageFile("/home/rpardrid/Desktop/testimg.jpg"); > > GLint texSize = 512; > GLenum  pixelFormat = test->getPixelFormat(); > GLenum  type = test->getDataType(); > > Image * largeImage = new Image; > largeImage->allocateImage(texSize, texSize, numImages, pixelFormat, type); > > test->scaleImage(texSize, texSize, 1); > > largeImage->copySubImage(0,0,0,test); > > ... > > Thank you! > > Cheers, > Robert > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=36754#36754 > > > > > > _______________________________________________ > 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

