SoGLDisplayList Class Reference

VSG extension OpenGL display list management class. More...

#include <Inventor/oglObjects/SoGLDisplayList.h>

Inheritance diagram for SoGLDisplayList:
SoBaseContextObject

List of all members.

Public Types

enum  Type {
  DISPLAY_LIST,
  TEXTURE1D_OBJECT,
  TEXTURE2D_OBJECT,
  TEXTURE2D_ARRAY_OBJECT,
  TEXTURE3D_OBJECT,
  TEXTURE_CUBE_MAP_OBJECT,
  FRAGMENT_PROGRAM_OBJECT,
  VERTEX_PROGRAM_OBJECT,
  TEXTURE_RECTANGLE_OBJECT,
  GLSL_FRAGMENT_SHADER_OBJECT,
  GLSL_VERTEX_SHADER_OBJECT,
  GLSL_GEOMETRY_SHADER_OBJECT,
  GLSL_PROGRAM_OBJECT,
  BUFFER_OBJECT,
  FRAMEBUFFER_OBJECT,
  ARRAY_BUFFER_OBJECT,
  ELEMENT_ARRAY_BUFFER_OBJECT,
  RENDERBUFFER_OBJECT,
  QUERY,
  GLSL_TESSELLATION_CONTROL_SHADER_OBJECT,
  GLSL_TESSELLATION_EVALUATION_SHADER_OBJECT,
  TRANSFORM_FEEDBACK
}

Public Member Functions

 SoGLDisplayList (SoState *state, Type type, int numToAllocate=1)
void open (SoState *state, int index=0)
bool close (SoState *state)
void call (SoState *state, int index=0)
void addDependency (SoState *state)
Type getType ()
int getNumAllocated ()
GLuint getFirstIndex ()
SoGLRenderCache * getParentRenderCache ()
void setParentRenderCache (SoGLRenderCache *parent)
void setCompileAndExecute (SbBool flag)
SbBool getCompileAndExecute () const

Detailed Description

VSG extension OpenGL display list management class.

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.

NOTE: This class does not exist in Open Inventor 10.0 and later.

Deprecated:

Deprecated since Open Inventor 9610
No longer supported, will be removed in next major release

Member Enumeration Documentation

Enumerator:
DISPLAY_LIST 
TEXTURE1D_OBJECT 
TEXTURE2D_OBJECT 
TEXTURE2D_ARRAY_OBJECT 
TEXTURE3D_OBJECT 
TEXTURE_CUBE_MAP_OBJECT 
FRAGMENT_PROGRAM_OBJECT 
VERTEX_PROGRAM_OBJECT 
TEXTURE_RECTANGLE_OBJECT 
GLSL_FRAGMENT_SHADER_OBJECT 
GLSL_VERTEX_SHADER_OBJECT 
GLSL_GEOMETRY_SHADER_OBJECT 
GLSL_PROGRAM_OBJECT 
BUFFER_OBJECT 
FRAMEBUFFER_OBJECT 
ARRAY_BUFFER_OBJECT 
ELEMENT_ARRAY_BUFFER_OBJECT 
RENDERBUFFER_OBJECT 
QUERY 
GLSL_TESSELLATION_CONTROL_SHADER_OBJECT 
GLSL_TESSELLATION_EVALUATION_SHADER_OBJECT 
TRANSFORM_FEEDBACK 

Constructor & Destructor Documentation

SoGLDisplayList::SoGLDisplayList ( SoState state,
Type  type,
int  numToAllocate = 1 
)

Constructor.

Takes state, type, and number of OpenGL objects to create.

numToAllocate > 1 is currently only meaningful for display lists.

Calls the appropriate glGen or glCreate function to create empty objects/display lists. If a texture object is requested and texture objects are not supported, the type will revert to DISPLAY_LIST.


Member Function Documentation

void SoGLDisplayList::addDependency ( SoState state  ) 

Adds a dependency on this object if there is another display list open in the state.

void SoGLDisplayList::call ( SoState state,
int  index = 0 
)

For DISPLAY_LIST objects, invokes the display list (calls glCallList).

For other object types, calls the appropriate glBind or glUse function.

This automatically adds a dependency (calls addDependency()) 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 directly to do the correct reference counting.

bool SoGLDisplayList::close ( SoState state  ) 

For DISPLAY_LIST objects, closes the display list (calls glEndList).

Returns FALSE if display list cannot be closed properly. If the display mode is COMPILE_AND_EXECUTE , the display list will automatically be invoked, else use the call() method to invoke it. COMPILE_AND_EXECUTE is the default, see the setCompileAndExecute() method.

For other object types, does nothing.

SbBool SoGLDisplayList::getCompileAndExecute (  )  const

Returns TRUE if current display list mode is GL_COMPILE_AND_EXECUTE.

Default is COMPILE_AND_EXECUTE.

GLuint SoGLDisplayList::getFirstIndex (  )  [inline]

Returns id of first OpenGL object owned by this instance.

int SoGLDisplayList::getNumAllocated (  )  [inline]

Returns number of OpenGL objects owned by this instance.

SoGLRenderCache* SoGLDisplayList::getParentRenderCache (  )  [inline]

Returns the parent render cache (initially NULL).

Type SoGLDisplayList::getType (  )  [inline]

Returns the object type (display list, texture, etc).

void SoGLDisplayList::open ( SoState state,
int  index = 0 
)

For DISPLAY_LIST objects, creates a new OpenGL display list (calls glNewList).

For other object types, calls the appropriate glBind or glUse function.

void SoGLDisplayList::setCompileAndExecute ( SbBool  flag  ) 

Sets whether to use GL_COMPILE or GL_COMPILE_AND_EXECUTE mode for display lists.

Default is COMPILE_AND_EXECUTE.

void SoGLDisplayList::setParentRenderCache ( SoGLRenderCache *  parent  ) 

Sets the parent render cache.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/