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

@@ -1027,6 +1027,15 @@ void LLRender::scalef(const GLfloat& x, const GLfloat& y, const GLfloat& z)
glScalef(x,y,z);
}
void LLRender::ortho(F32 left, F32 right, F32 bottom, F32 top, F32 zNear, F32 zFar)
{
glOrtho(left, right, bottom, top, zNear, zFar);
}
void LLRender::rotatef(const GLfloat& a, const GLfloat& x, const GLfloat& y, const GLfloat& z)
{
glRotatef(a,x,y,z);
}
void LLRender::pushMatrix()
{
flush();
@@ -1039,6 +1048,38 @@ void LLRender::popMatrix()
glPopMatrix();
}
void LLRender::loadMatrix(const GLfloat* m)
{
glLoadMatrixf(m);
}
void LLRender::multMatrix(const GLfloat* m)
{
glMultMatrixf(m);
}
void LLRender::matrixMode(U32 mode)
{
static GLenum modes[] =
{
GL_MODELVIEW,
GL_PROJECTION,
GL_TEXTURE,
GL_TEXTURE,
GL_TEXTURE,
GL_TEXTURE,
GL_TEXTURE,
GL_TEXTURE,
};
glMatrixMode(modes[mode]);
}
void LLRender::loadIdentity()
{
glLoadIdentity();
}
void LLRender::setColorMask(bool writeColor, bool writeAlpha)
{
setColorMask(writeColor, writeColor, writeColor, writeAlpha);
@@ -1209,6 +1250,11 @@ LLLightState* LLRender::getLight(U32 index)
return NULL;
}
void LLRender::setAmbientLightColor(const LLColor4& color)
{
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,color.mV);
}
bool LLRender::verifyTexUnitActive(U32 unitToVerify)
{
if (mCurrTextureUnitIndex == unitToVerify)
@@ -1506,6 +1552,31 @@ void LLRender::color3fv(const GLfloat* c)
color4f(c[0],c[1],c[2],1);
}
void LLRender::diffuseColor3f(F32 r, F32 g, F32 b)
{
glColor3f(r,g,b);
}
void LLRender::diffuseColor3fv(const F32* c)
{
glColor3fv(c);
}
void LLRender::diffuseColor4f(F32 r, F32 g, F32 b, F32 a)
{
glColor4f(r,g,b,a);
}
void LLRender::diffuseColor4fv(const F32* c)
{
glColor4fv(c);
}
void LLRender::diffuseColor4ubv(const U8* c)
{
glColor4ubv(c);
}
void LLRender::debugTexUnits(void)
{
LL_INFOS("TextureUnit") << "Active TexUnit: " << mCurrTextureUnitIndex << LL_ENDL;