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

@@ -231,12 +231,12 @@ void LLManipScale::render()
if( canAffectSelection() )
{
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
F32 zoom = gAgentCamera.mHUDCurZoom;
glScalef(zoom, zoom, zoom);
gGL.scalef(zoom, zoom, zoom);
}
////////////////////////////////////////////////////////////////////////
@@ -288,14 +288,14 @@ void LLManipScale::render()
LLVector3 pos_agent = bbox.getPositionAgent();
LLQuaternion rot = bbox.getRotation();
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
{
glTranslatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ]);
gGL.translatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ]);
F32 angle_radians, x, y, z;
rot.getAngleAxis(&angle_radians, &x, &y, &z);
glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
{
@@ -317,13 +317,13 @@ void LLManipScale::render()
glPolygonOffset( 0.f, 0.f);
}
}
glPopMatrix();
gGL.popMatrix();
if (mManipPart != LL_NO_PART)
{
renderSnapGuides(bbox);
}
glPopMatrix();
gGL.popMatrix();
renderXYZ(bbox.getExtentLocal());
}
@@ -733,17 +733,17 @@ void LLManipScale::renderEdges( const LLBBox& bbox )
LLVector3 direction = edgeToUnitVector( part );
LLVector3 center_to_edge = unitVectorToLocalBBoxExtent( direction, bbox );
glPushMatrix();
gGL.pushMatrix();
{
glTranslatef( center_to_edge.mV[0], center_to_edge.mV[1], center_to_edge.mV[2] );
gGL.translatef( center_to_edge.mV[0], center_to_edge.mV[1], center_to_edge.mV[2] );
conditionalHighlight( part );
glScalef(
gGL.scalef(
direction.mV[0] ? edge_width : extent.mV[VX],
direction.mV[1] ? edge_width : extent.mV[VY],
direction.mV[2] ? edge_width : extent.mV[VZ] );
gBox.render();
}
glPopMatrix();
gGL.popMatrix();
}
}
@@ -780,13 +780,13 @@ void LLManipScale::renderBoxHandle( F32 x, F32 y, F32 z )
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest gls_depth(GL_FALSE);
glPushMatrix();
gGL.pushMatrix();
{
glTranslatef( x, y, z );
glScalef( mScaledBoxHandleSize, mScaledBoxHandleSize, mScaledBoxHandleSize );
gGL.translatef( x, y, z );
gGL.scalef( mScaledBoxHandleSize, mScaledBoxHandleSize, mScaledBoxHandleSize );
gBox.render();
}
glPopMatrix();
gGL.popMatrix();
}
@@ -802,16 +802,16 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en
LLVector3 delta = end - offset_start;
LLVector3 pos = offset_start + 0.5f * delta;
glPushMatrix();
gGL.pushMatrix();
{
glTranslatef( pos.mV[VX], pos.mV[VY], pos.mV[VZ] );
glScalef(
gGL.translatef( pos.mV[VX], pos.mV[VY], pos.mV[VZ] );
gGL.scalef(
mBoxHandleSize + llabs(delta.mV[VX]),
mBoxHandleSize + llabs(delta.mV[VY]),
mBoxHandleSize + llabs(delta.mV[VZ]));
gBox.render();
}
glPopMatrix();
gGL.popMatrix();
}
else
{