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

Reply via email to