Open Inventor Reference
|
Class SoGLDisplayList: More...
#include <Inventor/elements/SoGLCacheContextElement.h>
Public Types | |
enum | Type { DISPLAY_LIST, TEXTURE_OBJECT, VERTEX_BUFFER_OBJECT } |
Constructor. More... | |
Public Member Functions | |
SoGLDisplayList (SoState *state, Type type, int numToAllocate=1) | |
void | ref () |
Because display lists may contain textures objects or other display lists, they must be reference counted. | |
void | unref (SoState *state=NULL) |
void | open (SoState *state, int index=0) |
Open/close a display list. | |
void | close (SoState *state) |
void | call (SoState *state, int index=0) |
Call a display list, or bind a texture object. | |
void | addDependency (SoState *state) |
Type | getType () |
Get methods. | |
int | getNumAllocated () |
GLuint | getFirstIndex () |
int | getContext () |
Friends | |
class | SoGLCacheContextElement |
A helper class used to store OpenGL display-list-like objects. Currently, it can store either texture objects (which must be treated like display lists; texture objects bound inside a display list must be reference counted, etc) and display lists.
Definition at line 114 of file SoGLCacheContextElement.h.
Takes state, type, and number of lists to allocate. Calls either glGenLists() or glGenTextures() to create empty objects/display lists.
DISPLAY_LIST | |
TEXTURE_OBJECT | |
VERTEX_BUFFER_OBJECT |
create a Vertex Buffer Object (MeVis ONLY) |
Definition at line 122 of file SoGLCacheContextElement.h.
void SoGLDisplayList::addDependency | ( | SoState * | state | ) |
void SoGLDisplayList::call | ( | SoState * | state, |
int | index = 0 |
||
) |
This automatically sets up a dependency if there is another display list open in the state. You can also use the get() methods below and make the OpenGL calls yourself, in which case you should call the addDependency() method to do the correct reference counting...
void SoGLDisplayList::close | ( | SoState * | state | ) |
int SoGLDisplayList::getContext | ( | ) | [inline] |
Definition at line 162 of file SoGLCacheContextElement.h.
GLuint SoGLDisplayList::getFirstIndex | ( | ) | [inline] |
Definition at line 161 of file SoGLCacheContextElement.h.
int SoGLDisplayList::getNumAllocated | ( | ) | [inline] |
Definition at line 160 of file SoGLCacheContextElement.h.
Type SoGLDisplayList::getType | ( | ) | [inline] |
Definition at line 159 of file SoGLCacheContextElement.h.
void SoGLDisplayList::open | ( | SoState * | state, |
int | index = 0 |
||
) |
void SoGLDisplayList::ref | ( | ) |
You can pass a NULL state to unref(); deletion of the display list or texture object will then be delayed until a render action is applied in the correct context.
void SoGLDisplayList::unref | ( | SoState * | state = NULL | ) |
friend class SoGLCacheContextElement [friend] |
Definition at line 173 of file SoGLCacheContextElement.h.