Several gl calls now wrapped via LLRender (gGL) as prep for future changes:

glMatrixMode -> gGL.matrixMode
..GL_MODELVIEW -> LLRender::MM_MODELVIEW
..GL_POJECTION -> LLRender::MM_PROJECTION
..GL_TEXTURE -> LLRender::MM_TEXTURE
glMultMatrix -> gGL.multMatrix
glLoadMatrixf -> gGL.loadMatrix
glPushMatrix -> gGL.pushMatrix
glPopMatrix -> gGL.popMatrix
glLoadIdentity -> gGL.loadIdentity
glRotatef -> gGL.rotatef
glTransformf -> gGL.transformf
glOrtho -> gGL.ortho
glColor3f -> gGL.diffuseColor3f
glColor3fv -> gGL.diffuseColor3fv
glColor4f -> gGL.diffuseColor4f
glColor4fv -> gGL.diffuseColor4fv
glColor4ubv -> gGL.diffuseColor4ubv
glLightModelfv(GL_LIGHT_MODEL_AMBIENT -> gGL.
This commit is contained in:
Shyotl
2011-11-21 15:55:44 -06:00
parent 1cf367aae5
commit 83e8a9076b
63 changed files with 1266 additions and 1134 deletions

View File

@@ -333,8 +333,8 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
aspect = getAspect();
// Load camera view matrix
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
gGL.matrixMode( LLRender::MM_PROJECTION );
gGL.loadIdentity();
glh::matrix4f proj_mat;
@@ -393,14 +393,14 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
proj_mat *= gl_perspective(fov_y,aspect,z_near,z_far);
glLoadMatrixf(proj_mat.m);
gGL.loadMatrix(proj_mat.m);
for (U32 i = 0; i < 16; i++)
{
gGLProjection[i] = proj_mat.m[i];
}
glMatrixMode( GL_MODELVIEW );
gGL.matrixMode(LLRender::MM_MODELVIEW );
glh::matrix4f modelview((GLfloat*) OGL_TO_CFR_ROTATION);
@@ -410,7 +410,7 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
modelview *= glh::matrix4f(ogl_matrix);
glLoadMatrixf(modelview.m);
gGL.loadMatrix(modelview.m);
if (for_selection && (width > 1 || height > 1))
{
@@ -439,10 +439,10 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
/*if (gSavedSettings.getBOOL("CameraOffset"))
{
glMatrixMode(GL_PROJECTION);
glTranslatef(0,0,-50);
glRotatef(20.0,1,0,0);
glMatrixMode(GL_MODELVIEW);
gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.translatef(0,0,-50);
gGL.rotatef(20.0,1,0,0);
gGL.matrixMode(LLRender::MM_MODELVIEW);
}*/
}