glodObjectXform - Tell GLOD to use the current OpenGL modelview
and projection matrices when it performs view-dependent refinement.
void glodObjectXform(GLuint objectname, float m1[16], float m2[16], float m3[16])
PARAMETERS
- objectname
-
The name of the object to bind to.
- m1, m2, m3
-
A set of matrices to bind against, stored in OpenGL's column-major order. If you want to bind against fewer than 3 matrices, set the latter ones to NULL. The final transformation applied to objectname is the product [m1]x[m2]x[m3]. Keep in mind that in order for view-dependent refinement to work, a perspective matrix must be included somewhere in the input matrices.
Adapation of objects in GLOD is done at a group level using the
glodAdaptGroup()
call. When you are adapting a group according to
the screen-space size of objects, you must specify to GLOD the
camera and current position of your object using homogenous
matrices using either the glodBindObjectXform()
or glodObjectXform()
calls.
Either function can be called at any point after loading or building an
object. The bound transform will persist indefinitely across this
GLOD session. It is not saved with a glodReadbackObject()
.
Note that binding a transformation to an object does not actually
move it during the glodDraw process. As always, the OpenGL rendering
state is not changed by GLOD. It is up to you to set
this same transformation before calling glodDrawPatch()
to ensure
the adaptation and the rendered position are consistent.