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 93 of file SoGLCacheContextElement.h.
Takes state, type, and number of lists to allocate. Calls either glGenLists() or glGenTextures() to create empty objects/display lists.
Enumerator | |
---|---|
DISPLAY_LIST | |
TEXTURE_OBJECT | |
VERTEX_BUFFER_OBJECT | create a Vertex Buffer Object (MeVis ONLY) |
Definition at line 101 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 | ) |
|
inline |
Definition at line 141 of file SoGLCacheContextElement.h.
|
inline |
Definition at line 140 of file SoGLCacheContextElement.h.
|
inline |
Definition at line 139 of file SoGLCacheContextElement.h.
|
inline |
Definition at line 138 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 |
Definition at line 152 of file SoGLCacheContextElement.h.