示例#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);
}
示例#2
0
文件: render.c 项目: Borf/CaveQuake
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);
}