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

@@ -81,6 +81,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
{
shader->bind();
shader->setMinimumAlpha(0.5f);
gGL.diffuseColor4f(1,1,1,1);
}
else
{
@@ -202,7 +203,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
U32 indices_drawn = 0;
glMatrixMode(GL_MODELVIEW);
gGL.matrixMode(LLRender::MM_MODELVIEW);
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
@@ -233,14 +234,14 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
}
gGLLastMatrix = NULL;
glLoadMatrixf(gGLModelView);
//glPushMatrix();
gGL.loadMatrix(gGLModelView);
//gGL.pushMatrix();
LLMatrix4 matrix(gGLModelView);
// Translate to tree base HACK - adjustment in Z plants tree underground
const LLVector3 &pos_agent = treep->getPositionAgent();
//glTranslatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
//gGL.translatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
LLMatrix4 trans_mat;
trans_mat.setTranslation(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
trans_mat *= matrix;
@@ -311,7 +312,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
indices_drawn += treep->drawBranchPipeline(scale_mat, indicesp, trunk_LOD, stop_depth, treep->mDepth, treep->mTrunkDepth, 1.0, treep->mTwist, droop, treep->mBranches, alpha);
}
//glPopMatrix();
//gGL.popMatrix();
}
}
}