Coin3D is Free Software, published under the BSD 3-clause license. |
https://bitbucket.org/Coin3D/ http://www.kongsberg.com/kogt/ |
The SoGLDisplayList class stores and manages OpenGL display lists. More...
#include <Inventor/elements/SoGLCacheContextElement.h>
Public Types | |
enum | Type { DISPLAY_LIST, TEXTURE_OBJECT } |
Public Member Functions | |
SoGLDisplayList (SoState *state, Type type, int allocnum=1, SbBool mipmaptexobj=FALSE) | |
void | ref (void) |
void | unref (SoState *state=NULL) |
void | open (SoState *state, int index=0) |
void | close (SoState *state) |
void | call (SoState *state, int index=0) |
void | addDependency (SoState *state) |
SbBool | isMipMapTextureObject (void) const |
Type | getType (void) const |
int | getNumAllocated (void) const |
unsigned int | getFirstIndex (void) const |
int | getContext (void) const |
void | setTextureTarget (int target) |
int | getTextureTarget (void) const |
The SoGLDisplayList class stores and manages OpenGL display lists.
The TEXTURE_OBJECT type is not directly supported in Coin. We handle textures differently in a more flexible class called SoGLImage, which also stores some information about the texture used when rendering. Old code which use this element should not stop working though. The texture object extension will just not be used, and the texture will be stored in a display list instead.
SoGLDisplayList::SoGLDisplayList | ( | SoState * | state, |
Type | type, | ||
int | allocnum = 1 , |
||
SbBool | mipmaptexobj = FALSE |
||
) |
Constructor.
void SoGLDisplayList::ref | ( | void | ) |
Increase reference count for this display list/texture object.
void SoGLDisplayList::unref | ( | SoState * | state = NULL | ) |
Decrease reference count for this instance. When reference count reaches 0, the instence is deleted.
Open this display list/texture object.
void SoGLDisplayList::close | ( | SoState * | state | ) |
Close this display list/texture object.
Execute this display list/texture object.
void SoGLDisplayList::addDependency | ( | SoState * | state | ) |
Create a dependency on the display list.
SbBool SoGLDisplayList::isMipMapTextureObject | ( | void | ) | const |
Returns whether the texture object stored in this instance was created with mipmap data. This method is an extension versus the Open Inventor API.
SoGLDisplayList::Type SoGLDisplayList::getType | ( | void | ) | const |
Return type. Display list or texture object.
int SoGLDisplayList::getNumAllocated | ( | void | ) | const |
Return number of display lists/texture objects allocated.
unsigned int SoGLDisplayList::getFirstIndex | ( | void | ) | const |
Return first GL index for this display list.
int SoGLDisplayList::getContext | ( | void | ) | const |
Return an id for the current context.
void SoGLDisplayList::setTextureTarget | ( | int | target | ) |
Sets the texture object target
int SoGLDisplayList::getTextureTarget | ( | void | ) | const |
Returns the texture target