Hi, J.P.
Now I use this method and it works.
data = new float[256*64*3];
f = fopen("data/transmittance.raw", "rb");
fread(data, 1, 256*64*3*sizeof(float), f);
fclose(f);
osg::Image* image_Transmittance = new osg::Image;
image_Transmittance->allocateImage(64,16,1,GL_RGB16F_ARB, GL_FLOAT,1);
float* dataPtr = (float*)image_Transmittance->data();
for(int i=0;i<256*64*3;i++)
{
*dataPtr++ = data[i];
}
And I simply want to use
image->setImage(64,16,1, GL_RGB16F_ARB, GL_RGB16F_ARB, GL_FLOAT, data,
osg::Image::USE_NEW_DELETE);
but it doesn't works. In osgprerender I found solution using first method when
you have loops to copy data.
Thank you!
Cheers,
Roman
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23419#23419
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org