.TH "SoGLTextureImageElement" 3 "Wed May 23 2012" "Version 3.1.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoGLTextureImageElement \- .PP The \fBSoGLTextureImageElement\fP is used to control the current GL texture\&. .PP This is a lazy element\&. It is evaluated in \fBSoShape::shouldGLRender()\fP\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoTextureImageElement\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual void \fBinit\fP (\fBSoState\fP *state)" .br .RI "\fIFIXME: write doc\&. \fP" .ti -1c .RI "virtual void \fBpush\fP (\fBSoState\fP *state)" .br .ti -1c .RI "virtual void \fBpop\fP (\fBSoState\fP *state, const \fBSoElement\fP *prevTopElement)" .br .ti -1c .RI "virtual SbBool \fBisTextureSizeLegal\fP (int xsize, int ysize, int zsize, int bytespertexel)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static int \fBgetClassStackIndex\fP (void)" .br .ti -1c .RI "static void * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static void \fBset\fP (\fBSoState\fP *const state, \fBSoNode\fP *const node, \fBSoGLImage\fP *image, const \fBModel\fP \fBmodel\fP, const \fBSbColor\fP &\fBblendColor\fP)" .br .ti -1c .RI "static \fBSoGLImage\fP * \fBget\fP (\fBSoState\fP *state, \fBModel\fP &\fBmodel\fP, \fBSbColor\fP &blendcolor)" .br .ti -1c .RI "static int32_t \fBgetMaxGLTextureSize\fP (void)" .br .ti -1c .RI "static SbBool \fBhasTransparency\fP (\fBSoState\fP *state)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoGLTextureImageElement\fP ()" .br .ti -1c .RI "virtual SbBool \fBhasTransparency\fP (void) const " .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoGLTextureImageElement\fP is used to control the current GL texture\&. .PP This is a lazy element\&. It is evaluated in \fBSoShape::shouldGLRender()\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoGLTextureImageElement::~SoGLTextureImageElement (void)\fC [protected]\fP, \fC [virtual]\fP" The destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoGLTextureImageElement::getClassTypeId (void)\fC [static]\fP" This static method returns the class type\&. .PP Reimplemented from \fBSoTextureImageElement\fP\&. .SS "int SoGLTextureImageElement::getClassStackIndex (void)\fC [static]\fP" This static method returns the state stack index for the class\&. .PP Reimplemented from \fBSoTextureImageElement\fP\&. .SS "void * SoGLTextureImageElement::createInstance (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 .PP Reimplemented from \fBSoTextureImageElement\fP\&. .SS "void SoGLTextureImageElement::initClass (void)\fC [static]\fP" This static method initializes static data in the \fBSoGLTextureImageElement\fP class\&. .PP Reimplemented from \fBSoTextureImageElement\fP\&. .SS "void SoGLTextureImageElement::push (\fBSoState\fP *state)\fC [virtual]\fP" This method is called every time a new element is required in one of the stacks\&. This happens when a writable element is requested, using \fBSoState::getElement()\fP or indirectly \fBSoElement::getElement()\fP, and the depth of the current element is less than the state depth\&. .PP Override this method if your element needs to copy data from the previous top of stack\&. The \fBpush()\fP method is called on the new element, and the previous element can be found using \fBSoElement::getNextInStack()\fP\&. .PP Reimplemented from \fBSoElement\fP\&. .SS "void SoGLTextureImageElement::pop (\fBSoState\fP *state, const \fBSoElement\fP *prevTopElement)\fC [virtual]\fP" This method is callled when the state is popped, and the depth of the element is bigger than the current state depth\&. \fBpop()\fP is called on the new top of stack, and a pointer to the previous top of stack is passed in \fIprevTopElement\fP\&. .PP Override this method if you need to copy some state information from the previous top of stack\&. .PP Reimplemented from \fBSoElement\fP\&. .SS "void SoGLTextureImageElement::set (\fBSoState\fP *conststateptr, \fBSoNode\fP *constnode, \fBSoGLImage\fP *image, const \fBModel\fPmodel, const \fBSbColor\fP &blendColor)\fC [static]\fP" Sets the current texture\&. Id \fIdidapply\fP is TRUE, it is assumed that the texture image already is the current GL texture\&. Do not use this feature unless you know what you're doing\&. .SS "int32_t SoGLTextureImageElement::getMaxGLTextureSize (void)\fC [static]\fP" The size returned by this function will just be a very coarse estimate as it only uses the more or less obsoleted technique of calling glGetIntegerv(GL_MAX_TEXTURE_SIZE)\&. .PP For a better estimate, use \fBSoGLTextureImageElement::isTextureSizeLegal()\fP\&. .PP Note that this function needs an OpenGL context to be made current for it to work\&. Without that, you will most likely get a faulty return value or even a crash\&. .SS "SbBool SoGLTextureImageElement::isTextureSizeLegal (intxsize, intysize, intzsize, intbytespertexel)\fC [virtual]\fP" Returns true if the texture with the given dimensions is supported by the current OpenGL context\&. .PP If zsize==0, 2D texturing is assumed, else 3D texturing is assumed\&. .PP This function uses OpenGL proxy textures and will fall back to what you get from \fBSoGLTextureImageElement::getMaxGLTextureSize()\fP if proxy textures are not supported (i\&.e\&. OpenGL version < 1\&.1 and GL_EXT_texture not available)\&. In the 3D case, 3D textures need to be supported (OpenGL >= 1\&.2 or GL_EXT_texture3D)\&. .PP Note that this function needs an OpenGL context to be made current for it to work\&. Without that, you will most likely get a faulty return value or even a crash\&. .PP This function 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 2\&.0 .RE .PP .SS "SbBool SoGLTextureImageElement::hasTransparency (\fBSoState\fP *state)\fC [static]\fP" Return TRUE if at least one pixel in the current texture image is transparent\&. .PP \fBSince:\fP .RS 4 Coin 3\&.1 .RE .PP .SS "SbBool SoGLTextureImageElement::hasTransparency (void) const\fC [protected]\fP, \fC [virtual]\fP" Called by \fBcontainsTransparency()\fP\&. Returns \fITRUE\fP if image data has transparency\&. Default method does a very poor job of detecting this, since it returns \fITRUE\fP when the number of components are 2 or .IP "4." 4 Override whenever it is important to know this (\fBSoGLTextureImageElement\fP overrides it to avoid transparency handling where possible)\&. .PP .PP Reimplemented from \fBSoTextureImageElement\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.