Hi Steven,

The r parameter is 1 for 2D textures, and the depth you want for a 3D texture.

The same applies to 1D textures, but in this case t and r are both 1.

Robert.

On 10/31/06, Steven T. Hatton <[EMAIL PROTECTED]> wrote:
The following two signatures appear in the interface for osg::Image:

void allocateImage (int s, int t, int r, GLenum pixelFormat, GLenum type, int
packing=1);

void setImage (int s, int t, int r, GLint internalTextureformat, GLenum
pixelFormat, GLenum type, unsigned char *data, AllocationMode mode, int
packing=1);

My immediate objective is to create an RGBA buffer that I can write to by
hand, and use as an image.  I know that 's' is width and 't' is height which
I am fairly sure are given in pixels.  I'm a bit unsure of how to specify
the 'r' value for depth.  It could be number of bytes per color, or number of
bytes per pixel.  It could also (though I've seen evidence to the contrary)
be measured in bits.  I assume the type I want is GL_UNSIGNED_SHORT_4_4_4_4,
and pixelFormat will be GL_RGBA.

Any ideas about 'r'?
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to