Hi,
I have try to create some 3d image using osg::image, and it seems that when you
create an image with width=height=depth the volume created is good, but when I
try to create an image with width!=hieght!= depth , when I fill the image with
unsigned char* data, the pixel is not at the right
(w != h != d) should be no problem. If they are all powers of two, it
should definitely work fine. If they are not powers of two, then of
course you need to have support for the NPOT extension (or OpenGL
version = 2.0).
-Paul
Thomas Canipel wrote:
Hi,
I have try to create some 3d image
Hi Thomas,
On 16/12/09 3:23 AM, Thomas Canipel wrote:
//creation of the data
int height=100;
int width=100;
int length=100;
const long size = width*height*length;
For RGB this needs to be (w*h*l)*3, ie. number-of-pixels * channels-per-pixel.
unsigned short* data = (unsigned
yes the allocate Image is not necessary it is override by the setImage(), I was
missing the size of the channel ;)
Thank you!
Cheers,
Thomas
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21588#21588
In order to use a limit of 255, I needed to use GL_UNSIGNED_BYTE (char)
Code:
int height=100;
int width=100;
int length=100;
const long size = width*height*length*3;
unsigned char* data = (unsigned char*)calloc(size,sizeof(unsigned
char));
Hi,
With osg::image normally you can setup a 3d image , but there is a problem for
the length someone know what is wrong with these declaration :
I want to create an image of 100x100x100
Code:
//creation of the data
int height=100;
int width=100;
int length=100;
const long size =
6 matches
Mail list logo