.TH "SoGLCubeMapImage" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoGLCubeMapImage \- 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 Public Types inherited from \fBSoGLImage\fP .in +1c .ti -1c .RI "enum \fBWrap\fP { \fBREPEAT\fP = 0, \fBCLAMP\fP, \fBCLAMP_TO_EDGE\fP, \fBCLAMP_TO_BORDER\fP }" .br .ti -1c .RI "enum \fBResizeReason\fP { \fBIMAGE\fP = 0, \fBSUBIMAGE\fP, \fBMIPMAP\fP }" .br .ti -1c .RI "enum \fBFlags\fP { \fBSCALE_DOWN\fP = 0x0001, \fBNO_MIPMAP\fP = 0x0002, \fBLINEAR_MAG_FILTER\fP = 0x0004, \fBLINEAR_MIN_FILTER\fP = 0x0008, \fBLINEAR_MIPMAP_FILTER\fP = 0x0010, \fBFORCE_TRANSPARENCY_TRUE\fP = 0x0020, \fBFORCE_TRANSPARENCY_FALSE\fP = 0x0040, \fBFORCE_ALPHA_TEST_TRUE\fP = 0x0080, \fBFORCE_ALPHA_TEST_FALSE\fP = 0x0100, \fBINVINCIBLE\fP = 0x0200, \fBRECTANGLE\fP = 0x0400, \fBCOMPRESSED\fP = 0x0800, \fBUSE_QUALITY_VALUE\fP = 0X8000 }" .br .ti -1c .RI "\fBtypedef\fP SbBool \fBSoGLImageResizeCB\fP(\fBSoState\fP *state, \fBconst\fP \fBSbVec3s\fP &\fBnewsize\fP, \fBunsigned\fP char *\fBdestbuffer\fP, \fBResizeReason\fP \fBreason\fP, \fBvoid\fP *closure, \fBclass\fP \fBSoGLImage\fP *image)" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoGLCubeMapImage\fP ()" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBunref\fP (\fBSoState\fP *state=\fBNULL\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBSoType\fP \fBgetTypeId\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetCubeMapImage\fP (\fBconst\fP Target target, \fBconst\fP \fBunsigned\fP char *bytes, \fBconst\fP \fBSbVec2s\fP &size, \fBconst\fP int \fBnumcomponents\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetData\fP (\fBconst\fP \fBSbImage\fP *image, \fBconst\fP \fBWrap\fP wraps=REPEAT, \fBconst\fP \fBWrap\fP wrapt=REPEAT, \fBconst\fP float quality=0\&.5f, \fBconst\fP int border=0, \fBSoState\fP *\fBcreateinstate\fP=\fBNULL\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetData\fP (\fBconst\fP \fBSbImage\fP *image, \fBconst\fP \fBWrap\fP wraps, \fBconst\fP \fBWrap\fP wrapt, \fBconst\fP \fBWrap\fP wrapr, \fBconst\fP float quality=0\&.5f, \fBconst\fP int border=0, \fBSoState\fP *\fBcreateinstate\fP=\fBNULL\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBSoGLDisplayList\fP * \fBgetGLDisplayList\fP (\fBSoState\fP *state)" .br .in -1c Public Member Functions inherited from \fBSoGLImage\fP .in +1c .ti -1c .RI "\fBSoGLImage\fP ()" .br .ti -1c .RI "\fBvirtual\fP SbBool \fBisOfType\fP (\fBSoType\fP type) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetGLDisplayList\fP (\fBSoGLDisplayList\fP *\fBdl\fP, \fBSoState\fP *state, \fBconst\fP \fBWrap\fP wraps=REPEAT, \fBconst\fP \fBWrap\fP wrapt=REPEAT, \fBconst\fP float quality=0\&.5f)" .br .ti -1c .RI "\fBvoid\fP \fBsetPBuffer\fP (\fBSoState\fP *state, \fBvoid\fP *context, \fBconst\fP \fBWrap\fP wraps=REPEAT, \fBconst\fP \fBWrap\fP wrapt=REPEAT, \fBconst\fP float quality=0\&.5f)" .br .ti -1c .RI "\fBvoid\fP \fBsetData\fP (\fBconst\fP \fBunsigned\fP char *bytes, \fBconst\fP \fBSbVec2s\fP &size, \fBconst\fP int \fBnumcomponents\fP, \fBconst\fP \fBWrap\fP wraps=REPEAT, \fBconst\fP \fBWrap\fP wrapt=REPEAT, \fBconst\fP float quality=0\&.5f, \fBconst\fP int border=0, \fBSoState\fP *\fBcreateinstate\fP=\fBNULL\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetData\fP (\fBconst\fP \fBunsigned\fP char *bytes, \fBconst\fP \fBSbVec3s\fP &size, \fBconst\fP int \fBnumcomponents\fP, \fBconst\fP \fBWrap\fP wraps=REPEAT, \fBconst\fP \fBWrap\fP wrapt=REPEAT, \fBconst\fP \fBWrap\fP wrapr=REPEAT, \fBconst\fP float quality=0\&.5f, \fBconst\fP int border=0, \fBSoState\fP *\fBcreateinstate\fP=\fBNULL\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetFlags\fP (\fBconst\fP uint32_t flags)" .br .ti -1c .RI "uint32_t \fBgetFlags\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbImage\fP * \fBgetImage\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBhasTransparency\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBuseAlphaTest\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBWrap\fP \fBgetWrapS\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBWrap\fP \fBgetWrapT\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBWrap\fP \fBgetWrapR\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "float \fBgetQuality\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "uint32_t \fBgetGLImageId\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetEndFrameCallback\fP (\fBvoid\fP(*cb)(\fBvoid\fP *), \fBvoid\fP *closure)" .br .ti -1c .RI "int \fBgetNumFramesSinceUsed\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "\fBstatic\fP \fBSoType\fP \fBgetClassTypeId\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitClass\fP (\fBvoid\fP)" .br .in -1c Static Public Member Functions inherited from \fBSoGLImage\fP .in +1c .ti -1c .RI "\fBstatic\fP \fBSoType\fP \fBgetClassTypeId\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBbeginFrame\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBtagImage\fP (\fBSoState\fP *state, \fBSoGLImage\fP *image)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBendFrame\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBsetDisplayListMaxAge\fP (\fBconst\fP uint32_t maxage)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBfreeAllImages\fP (\fBSoState\fP *state=\fBNULL\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitClass\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBsetResizeCallback\fP (\fBSoGLImageResizeCB\fP *f, \fBvoid\fP *closure)" .br .in -1c .SS "Additional Inherited Members" Protected Member Functions inherited from \fBSoGLImage\fP .in +1c .ti -1c .RI "\fBvoid\fP \fBincAge\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBresetAge\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBunrefOldDL\fP (\fBSoState\fP *state, \fBconst\fP uint32_t maxage)" .br .ti -1c .RI "\fBvirtual\fP \fB~SoGLImage\fP ()" .br .in -1c .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 \fBv2\&.1\fP API\&. .br .PP \fBSince\fP .RS 4 Coin \fB3\&.0\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoGLCubeMapImage::SoGLCubeMapImage (\fBvoid\fP)" Constructor\&. .SH "Member Function Documentation" .PP .SS "\fBvoid\fP SoGLCubeMapImage::unref (\fBSoState\fP * state = \fC\fBNULL\fP\fP)\fC [virtual]\fP" This class has a private destructor 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::getClassTypeId (\fBvoid\fP)\fC [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .SS "\fBSoType\fP SoGLCubeMapImage::getTypeId (\fBvoid\fP) const\fC [virtual]\fP" Returns the type identification of an object derived from a class inheriting \fBSoGLImage\fP\&. This is used for runtime type checking and 'downward' casting\&. .PP Reimplemented from \fBSoGLImage\fP\&. .SS "\fBvoid\fP SoGLCubeMapImage::setData (\fBconst\fP \fBSbImage\fP * image, \fBconst\fP \fBWrap\fP wraps = \fCREPEAT\fP, \fBconst\fP \fBWrap\fP wrapt = \fCREPEAT\fP, \fBconst\fP float quality = \fC0\&.5f\fP, \fBconst\fP int border = \fC0\fP, \fBSoState\fP * createinstate = \fC\fBNULL\fP\fP)\fC [virtual]\fP" Convenience 2D wrapper function around the 3D \fBsetData()\fP\&. .PP Reimplemented from \fBSoGLImage\fP\&. .SS "\fBvoid\fP SoGLCubeMapImage::setData (\fBconst\fP \fBSbImage\fP * image, \fBconst\fP \fBWrap\fP wraps, \fBconst\fP \fBWrap\fP wrapt, \fBconst\fP \fBWrap\fP wrapr, \fBconst\fP float quality = \fC0\&.5f\fP, \fBconst\fP int border = \fC0\fP, \fBSoState\fP * createinstate = \fC\fBNULL\fP\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 \fBv1\&.2\fP implementations, and as an extension on some earlier SGI implementations (GL_SGIS_texture_edge_clamp)\&. .PP For now, if quality > \fB0\&.5\fP when created, we create mipmaps, otherwise a regular texture is created\&. Be aware, if you for instance create a texture with texture quality \fB0\&.4\fP, and then later try to apply the texture with a texture quality greater than \fB0\&.5\fP, 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 \fBSoGLDisplayList\fP could be created\&. .PP Reimplemented from \fBSoGLImage\fP\&. .SS "\fBvoid\fP SoGLCubeMapImage::initClass (\fBvoid\fP)\fC [static]\fP" This static method initializes static data for the \fBSoGLCubeMapImage\fP class\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.