Overview Function List GLOD Web Site

NAME

glodLoadObject - Loads an object that was previously read with glodReadbackObject()

C SPECIFICATION

void glodLoadObject(GLuint name , GLuint groupname , const GLvoid* data)

PARAMETERS

name
The name of the object to create from the loaded hierarchy. Object name must not already exist.

groupname
The name of the group in which to place the object.

data
A pointer to the buffer contanining the readback GLOD object.

DESCRIPTION

This mechanism is provided to allow you to decouple the creation and use of multiresolution objects across multiple program invocations. glodLoadObject accepts any binary data that was previously created with glodReadbackObject() .

After being loaded, a GLOD object is in the same default state as it it would be following a glodBuildObject() call. This means that it has not necessarily been adapted to a particular LOD and thus cannot yet be drawn. You must set any relevant adaptation parameters before you proceed onward to drawing this object.

USAGE

One usually reads back an object from GLOD first using glodReadbackObject() :

  void* data; int data_size;
  glodGetObjectParameter(MY_OBJ_NAME, GLOD_READBACK_SIZE, &data_size); 
  data = malloc(data_size);
  glodReadbackObject(MY_OBJ_NAME, data);

You could then write this data to a file. When you later decide to use it:

  void* data; int data_size;
  glodLoadObject(NEW_OBJ_NAME, NEW_GROUP_NAME, data);

ERRORS

GLOD_INVALID_NAME is generated if an object of the given name exists.
GLOD_BAD_MAGIC is generated if the buffer format is corrupt or incompatible with this version of GLOD.
GLOD_BAD_HIERARCHY is generated if the hierarchy type (the format flag of glodBuildObject()) encoded in this buffer is not supported by this version of GLOD.
GLOD_CORRUPT_BUFFER is generated if the buffer is, though valid in all other respects, found to be corrupt.

Last modified: 06/10/04 06:32:22 PM