glodLoadObject - Loads an object that was previously read with glodReadbackObject()
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.
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.
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);