MAINT-685: Fix for disabling basic shaders making high detail terrain render incorrectly. http://hg.secondlife.com/viewer-development/changeset/218a7b78dcc5f53f38de063f3a229a7462fe052f
This commit is contained in:
@@ -59,7 +59,6 @@ protected:
|
||||
LLGLEnable mColorMaterial;
|
||||
LLGLDisable mAlphaTest, mBlend, mCullFace, mDither, mFog,
|
||||
mLineSmooth, mLineStipple, mNormalize, mPolygonSmooth,
|
||||
mTextureGenQ, mTextureGenR, mTextureGenS, mTextureGenT,
|
||||
mGLMultisample;
|
||||
public:
|
||||
LLGLSDefault()
|
||||
@@ -76,10 +75,6 @@ public:
|
||||
mLineStipple(GL_LINE_STIPPLE),
|
||||
mNormalize(GL_NORMALIZE),
|
||||
mPolygonSmooth(GL_POLYGON_SMOOTH),
|
||||
mTextureGenQ(GL_TEXTURE_GEN_Q),
|
||||
mTextureGenR(GL_TEXTURE_GEN_R),
|
||||
mTextureGenS(GL_TEXTURE_GEN_S),
|
||||
mTextureGenT(GL_TEXTURE_GEN_T),
|
||||
mGLMultisample(GL_MULTISAMPLE_ARB)
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -1451,6 +1451,16 @@ void LLRender::matrixMode(U32 mode)
|
||||
mMatrixMode = mode;
|
||||
}
|
||||
|
||||
U32 LLRender::getMatrixMode()
|
||||
{
|
||||
if (mMatrixMode >= MM_TEXTURE0 && mMatrixMode <= MM_TEXTURE3)
|
||||
{ //always return MM_TEXTURE if current matrix mode points at any texture matrix
|
||||
return MM_TEXTURE;
|
||||
}
|
||||
return mMatrixMode;
|
||||
}
|
||||
|
||||
|
||||
void LLRender::loadIdentity()
|
||||
{
|
||||
flush();
|
||||
|
||||
@@ -345,6 +345,7 @@ public:
|
||||
void loadIdentity();
|
||||
void multMatrix(const GLfloat* m);
|
||||
void matrixMode(U32 mode);
|
||||
U32 getMatrixMode();
|
||||
|
||||
const glh::matrix4f& getModelviewMatrix();
|
||||
const glh::matrix4f& getProjectionMatrix();
|
||||
|
||||
@@ -575,6 +575,8 @@ void LLDrawPoolTerrain::renderFull4TU()
|
||||
gGL.loadIdentity();
|
||||
gGL.translatef(-1.f, 0.f, 0.f);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
|
||||
// Set alpha texture and do lighting modulation
|
||||
gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR);
|
||||
gGL.getTexUnit(3)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA);
|
||||
@@ -722,6 +724,7 @@ void LLDrawPoolTerrain::renderFull2TU()
|
||||
gGL.matrixMode(LLRender::MM_TEXTURE);
|
||||
gGL.loadIdentity();
|
||||
gGL.translatef(-1.f, 0.f, 0.f);
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
|
||||
// Care about alpha only
|
||||
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
|
||||
@@ -761,7 +764,7 @@ void LLDrawPoolTerrain::renderFull2TU()
|
||||
gGL.matrixMode(LLRender::MM_TEXTURE);
|
||||
gGL.loadIdentity();
|
||||
gGL.translatef(-2.f, 0.f, 0.f);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
// Care about alpha only
|
||||
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
|
||||
gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA);
|
||||
|
||||
@@ -86,9 +86,9 @@ public:
|
||||
glNormalPointer(GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_NORMAL], (void*)(base + mOffsets[TYPE_NORMAL]));
|
||||
}
|
||||
if (data_mask & MAP_TEXCOORD3)
|
||||
{ //substitute tex coord 0 for tex coord 3
|
||||
{ //substitute tex coord 1 for tex coord 3
|
||||
glClientActiveTextureARB(GL_TEXTURE3_ARB);
|
||||
glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], (void*)(base + mOffsets[TYPE_TEXCOORD0]));
|
||||
glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], (void*)(base + mOffsets[TYPE_TEXCOORD1]));
|
||||
glClientActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
}
|
||||
if (data_mask & MAP_TEXCOORD2)
|
||||
|
||||
Reference in New Issue
Block a user