SoGLCubeMapImage(3)
π SoGLCubeMapImage β Library Functions Manual β¨
okay so bestie, welcome to SoGLCubeMapImage(3) π
this is one of those pages where the class name sounds scary but it's literally just cube map textures. we got this. π«Ά
πΈ NAME πΈ
SoGLCubeMapImage β the class that handles cube map textures π
π¦ SYNOPSIS π¦
#include <include/Inventor/misc/SoGLCubeMapImage.h>
Inherits SoGLImage. so yeah, everything SoGLImage can do, this baby also does. iconic lineage fr fr π
β¨ Public Types β¨
enum Target { NEGATIVE_X = 0, POSITIVE_X, NEGATIVE_Y, POSITIVE_Y,
NEGATIVE_Z, POSITIVE_Z }
π Public Types inherited from SoGLImage
enum Wrap { REPEAT = 0, CLAMP, CLAMP_TO_EDGE, CLAMP_TO_BORDER }
enum ResizeReason { IMAGE = 0, SUBIMAGE, MIPMAP }
enum Flags { SCALE_DOWN = 0x0001, NO_MIPMAP = 0x0002, LINEAR_MAG_FILTER
= 0x0004, LINEAR_MIN_FILTER = 0x0008, LINEAR_MIPMAP_FILTER = 0x0010,
FORCE_TRANSPARENCY_TRUE = 0x0020, FORCE_TRANSPARENCY_FALSE = 0x0040,
FORCE_ALPHA_TEST_TRUE = 0x0080, FORCE_ALPHA_TEST_FALSE = 0x0100,
INVINCIBLE = 0x0200, RECTANGLE = 0x0400, COMPRESSED = 0x0800,
USE_QUALITY_VALUE = 0X8000 }
typedef SbBool SoGLImageResizeCB(SoState *state, const SbVec3s &newsize,
unsigned char *destbuffer, ResizeReason reason, void *closure, class
SoGLImage *image)
(yes it's 0X8000 with a capital X, that's not me being sloppy, that's verbatim π)
π Public Member Functions π
SoGLCubeMapImage ()
virtual void unref (SoState *state=NULL)
virtual SoType getTypeId (void) const
void setCubeMapImage (const Target target, const unsigned char *bytes,
const SbVec2s &size, const int numcomponents)
virtual void setData (const SbImage *image, const Wrap wraps=REPEAT,
const Wrap wrapt=REPEAT, const float quality=0.5f, const int
border=0, SoState *createinstate=NULL)
virtual void setData (const SbImage *image, const Wrap wraps, const Wrap
wrapt, const Wrap wrapr, const float quality=0.5f, const int
border=0, SoState *createinstate=NULL)
virtual SoGLDisplayList * getGLDisplayList (SoState *state)
π« Public Member Functions inherited from SoGLImage
SoGLImage ()
virtual SbBool isOfType (SoType type) const
void setGLDisplayList (SoGLDisplayList *dl, SoState *state, const Wrap
wraps=REPEAT, const Wrap wrapt=REPEAT, const float quality=0.5f)
void setPBuffer (SoState *state, void *context, const Wrap wraps=REPEAT,
const Wrap wrapt=REPEAT, const float quality=0.5f)
void setData (const unsigned char *bytes, const SbVec2s &size, const int
numcomponents, const Wrap wraps=REPEAT, const Wrap wrapt=REPEAT,
const float quality=0.5f, const int border=0, SoState
*createinstate=NULL)
void setData (const unsigned char *bytes, const SbVec3s &size, const int
numcomponents, const Wrap wraps=REPEAT, const Wrap wrapt=REPEAT,
const Wrap wrapr=REPEAT, const float quality=0.5f, const int
border=0, SoState *createinstate=NULL)
void setFlags (const uint32_t flags)
uint32_t getFlags (void) const
const SbImage * getImage (void) const
SbBool hasTransparency (void) const
SbBool useAlphaTest (void) const
Wrap getWrapS (void) const
Wrap getWrapT (void) const
Wrap getWrapR (void) const
float getQuality (void) const
uint32_t getGLImageId (void) const
void setEndFrameCallback (void(*cb)(void *), void *closure)
int getNumFramesSinceUsed (void) const
π Static Public Member Functions π
static SoType getClassTypeId (void)
static void initClass (void)
β Static Public Member Functions inherited from SoGLImage
static SoType getClassTypeId (void)
static void beginFrame (SoState *state)
static void tagImage (SoState *state, SoGLImage *image)
static void endFrame (SoState *state)
static void setDisplayListMaxAge (const uint32_t maxage)
static void freeAllImages (SoState *state=NULL)
static void initClass (void)
static void setResizeCallback (SoGLImageResizeCB *f, void *closure)
π§ Additional Inherited Members
π Protected Member Functions inherited from SoGLImage
void incAge (void) const
void resetAge (void) const
virtual void unrefOldDL (SoState *state, const uint32_t maxage)
virtual ~SoGLImage ()
π₯ Detailed Description π₯
The SoGLCubeMapImage class is used to handle cube map textures. that's the whole vibe. six faces, one class, slay. π
heads up bestie: be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. so if you're porting old code, don't come for me. π
Since β Coin 3.0 π
π Constructor & Destructor Documentation π
SoGLCubeMapImage::SoGLCubeMapImage (void )
Constructor. that's it, that's the whole note. main character energy β¨
π Member Function Documentation π
void SoGLCubeMapImage::unref (SoState * state = NULL) [virtual]
This class has a private destructor since we want users to supply the current GL state when deleting the image. the reason? so we can make sure gl texture objects get freed as soon as possible. π
if you hand this method NULL, the gl texture objects won't be deleted until the next time an GLRenderAction is applied in the image's cache context(s). so like, they're just chilling there until then. no cap.
Reimplemented from SoGLImage.
SoType SoGLCubeMapImage::getTypeId (void ) const [virtual]
Returns the type id for an SoGLImage instance.
Reimplemented from SoGLImage.
void SoGLCubeMapImage::setData (const SbImage * image, const Wrap wraps = REPEAT, const Wrap wrapt = REPEAT, const float quality = 0.5f, const int border = 0, SoState * createinstate = NULL) [virtual]
Convenience 2D wrapper function around the 3D setData(). basically the lil shortcut version π«Ά
Reimplemented from SoGLImage.
void SoGLCubeMapImage::setData (const SbImage * image, const Wrap wraps, const Wrap wrapt, const Wrap wrapr, const float quality = 0.5f, const int border = 0, SoState * createinstate = NULL) [virtual]
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. so don't just spam it for fun, bestie, it's not a free action.
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).
for now, if quality > 0.5 when created, we create mipmaps, otherwise a regular texture is created. and 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. π
If border != 0, the OpenGL texture will be created with this border size. > be aware that this might be extremely slow on most PC hardware. like, painfully slow. we're talking "go get a snack while it renders" slow. π
Normally, the OpenGL texture object isn't created until the first time it is needed, but if createinstate is != NULL, the texture object is created immediately. this is useful if you use a temporary buffer to hold the texture data. but 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 createinstate is != NULL. π
Also if createinstate 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. ate. π₯
If you supply NULL for image, the instance will be reset, causing all display lists and memory to be freed. spring cleaning era π§Ήβ¨
Reimplemented from SoGLImage.
SoGLDisplayList * SoGLCubeMapImage::getGLDisplayList (SoState * state) [virtual]
Returns or creates a SoGLDisplayList to be used for rendering. Returns NULL if no SoDLDisplayList could be created. so like, if you get NULL back, that's the "nope, couldn't do it" signal. π«
Reimplemented from SoGLImage.
void SoGLCubeMapImage::initClass (void ) [static]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. so like, it's giving backstage pass, you probably don't need it π
π Author π
Generated automatically by Doxygen for Coin from the source code. (a robot wrote this, and honestly? it ate. π€β¨)
okay that's the whole page bestie!! this was SoGLCubeMapImage(3) from Coin, Version 3.1.3 β thanks for reading, go forth and cube-map responsibly π¦ππ
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms