Beispiel #1
0
void gen_clipmat(void)
{
//	return;
    mat4_t modelview;
    mat4_t proj;

    /* Get the modelview and projection matricies from GL */
    glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&modelview);
    glGetFloatv(GL_PROJECTION_MATRIX, (GLfloat*)&proj);

    /* Multiply to get clip coordinate transformation */
    mat4_mmult(proj, modelview, clipmat);
}
Beispiel #2
0
static void
gen_clipmat(r_context_t *c)
{
    mat4_t modelview;
    mat4_t proj;

    /* Get the modelview and projection matricies from GL */
    glGetFloatv(GL_MODELVIEW_MATRIX, modelview);
    glGetFloatv(GL_PROJECTION_MATRIX, proj);

    /* Multiply to get clip coordinate transformation */
    mat4_mmult(proj, modelview, c->clipmat);
}