.TH "SoGLCubeMapImage" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoGLCubeMapImage \- .PP The \fBSoGLCubeMapImage\fP class is used to handle cube map textures\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoGLImage\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBTarget\fP { \fBNEGATIVE_X\fP = 0, \fBPOSITIVE_X\fP, \fBNEGATIVE_Y\fP, \fBPOSITIVE_Y\fP, \fBNEGATIVE_Z\fP, \fBPOSITIVE_Z\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoGLCubeMapImage\fP ()" .br .ti -1c .RI "virtual void \fBunref\fP (\fBSoState\fP *state=NULL)" .br .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .ti -1c .RI "void \fBsetCubeMapImage\fP (const Target target, const unsigned char *bytes, const \fBSbVec2s\fP &size, const int numcomponents)" .br .ti -1c .RI "virtual void \fBsetData\fP (const \fBSbImage\fP *image, const \fBWrap\fP wraps=REPEAT, const \fBWrap\fP wrapt=REPEAT, const float quality=0\&.5f, const int border=0, SoState *createinstate=NULL)" .br .ti -1c .RI "virtual void \fBsetData\fP (const \fBSbImage\fP *image, const \fBWrap\fP wraps, const \fBWrap\fP wrapt, const \fBWrap\fP wrapr, const float quality=0\&.5f, const int border=0, SoState *createinstate=NULL)" .br .ti -1c .RI "virtual \fBSoGLDisplayList\fP * \fBgetGLDisplayList\fP (\fBSoState\fP *state)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoGLCubeMapImage\fP class is used to handle cube map textures\&. Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .PP \fBSince:\fP .RS 4 Coin 3\&.0 .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoGLCubeMapImage::SoGLCubeMapImage (void)" Constructor\&. .SH "Member Function Documentation" .PP .SS "void SoGLCubeMapImage::unref (\fBSoState\fP *state = \fCNULL\fP)\fC [virtual]\fP" This class has a private destuctor since we want users to supply the current GL state when deleting the image\&. This is to make sure gl texture objects are freed as soon as possible\&. If you supply NULL to this method, the gl texture objects won't be deleted until the next time an GLRenderAction is applied in the image's cache context(s)\&. .PP Reimplemented from \fBSoGLImage\fP\&. .SS "\fBSoType\fP SoGLCubeMapImage::getTypeId (void) const\fC [virtual]\fP" Returns the type id for an \fBSoGLImage\fP instance\&. .PP Reimplemented from \fBSoGLImage\fP\&. .SS "void SoGLCubeMapImage::setData (const \fBSbImage\fP *image, const \fBWrap\fPwraps = \fCREPEAT\fP, const \fBWrap\fPwrapt = \fCREPEAT\fP, const floatquality = \fC0\&.5f\fP, const intborder = \fC0\fP, \fBSoState\fP *createinstate = \fCNULL\fP)\fC [virtual]\fP" Convenience 2D wrapper function around the 3D \fBsetData()\fP\&. .PP Reimplemented from \fBSoGLImage\fP\&. .SS "void SoGLCubeMapImage::setData (const \fBSbImage\fP *image, const \fBWrap\fPwraps, const \fBWrap\fPwrapt, const \fBWrap\fPwrapr, const floatquality = \fC0\&.5f\fP, const intborder = \fC0\fP, \fBSoState\fP *createinstate = \fCNULL\fP)\fC [virtual]\fP" Sets the data for this GL image\&. Should only be called when one of the parameters have changed, since this will cause the GL texture object to be recreated\&. Caller is responsible for sending legal Wrap values\&. CLAMP_TO_EDGE is only supported on OpenGL v1\&.2 implementations, and as an extension on some earlier SGI implementations (GL_SGIS_texture_edge_clamp)\&. .PP For now, if quality > 0\&.5 when created, we create mipmaps, otherwise a regular texture is created\&. Be aware, if you for instance create a texture with texture quality 0\&.4, and then later try to apply the texture with a texture quality greater than 0\&.5, the texture object will be recreated as a mipmap texture object\&. This will happen only once though, of course\&. .PP If \fIborder\fP != 0, the OpenGL texture will be created with this border size\&. Be aware that this might be extremely slow on most PC hardware\&. .PP Normally, the OpenGL texture object isn't created until the first time it is needed, but if \fIcreateinstate\fP is != NULL, the texture object is created immediately\&. This is useful if you use a temporary buffer to hold the texture data\&. Be careful when using this feature, since the texture data might be needed at a later stage (for instance to create a texture object for another context)\&. It will not be possible to create texture objects for other cache contexts when \fIcreateinstate\fP is != NULL\&. .PP Also if \fIcreateinstate\fP is supplied, and all the attributes are the same as the current data in the image, glTexSubImage() will be used to insert the image data instead of creating a new texture object\&. This is much faster on most OpenGL drivers, and is very useful, for instance when doing animated textures\&. .PP If you supply NULL for \fIimage\fP, the instance will be reset, causing all display lists and memory to be freed\&. .PP Reimplemented from \fBSoGLImage\fP\&. .SS "\fBSoGLDisplayList\fP * SoGLCubeMapImage::getGLDisplayList (\fBSoState\fP *state)\fC [virtual]\fP" Returns or creates a \fBSoGLDisplayList\fP to be used for rendering\&. Returns NULL if no SoDLDisplayList could be created\&. .PP Reimplemented from \fBSoGLImage\fP\&. .SS "void SoGLCubeMapImage::initClass (void)\fC [static]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.