summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llrender.cpp32
-rw-r--r--indra/llui/llaccordionctrltab.cpp3
-rw-r--r--indra/llui/llclipboard.cpp2
-rw-r--r--indra/llui/llui.cpp8
-rw-r--r--indra/llui/llview.cpp3
5 files changed, 38 insertions, 10 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 9acfb6b0a8..26282b0ee3 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -121,6 +121,8 @@ void LLTexUnit::refreshState(void)
// We set dirty to true so that the tex unit knows to ignore caching
// and we reset the cached tex unit state
+ gGL.flush();
+
glActiveTextureARB(GL_TEXTURE0_ARB + mIndex);
if (mCurrTexType != TT_NONE)
{
@@ -182,6 +184,7 @@ void LLTexUnit::disable(void)
{
activate();
unbind(mCurrTexType);
+ gGL.flush();
glDisable(sGLTextureType[mCurrTexType]);
mCurrTexType = TT_NONE;
}
@@ -717,6 +720,7 @@ void LLTexUnit::setColorScale(S32 scale)
if (mCurrColorScale != scale || gGL.mDirty)
{
mCurrColorScale = scale;
+ gGL.flush();
glTexEnvi( GL_TEXTURE_ENV, GL_RGB_SCALE, scale );
}
}
@@ -726,6 +730,7 @@ void LLTexUnit::setAlphaScale(S32 scale)
if (mCurrAlphaScale != scale || gGL.mDirty)
{
mCurrAlphaScale = scale;
+ gGL.flush();
glTexEnvi( GL_TEXTURE_ENV, GL_ALPHA_SCALE, scale );
}
}
@@ -1113,6 +1118,33 @@ void LLRender::flush()
sUICalls++;
sUIVerts += mCount;
}
+
+ if (gDebugGL)
+ {
+ if (mMode == LLRender::QUADS)
+ {
+ if (mCount%4 != 0)
+ {
+ llerrs << "Incomplete quad rendered." << llendl;
+ }
+ }
+
+ if (mMode == LLRender::TRIANGLES)
+ {
+ if (mCount%3 != 0)
+ {
+ llerrs << "Incomplete triangle rendered." << llendl;
+ }
+ }
+
+ if (mMode == LLRender::LINES)
+ {
+ if (mCount%2 != 0)
+ {
+ llerrs << "Incomplete line rendered." << llendl;
+ }
+ }
+ }
mBuffer->setBuffer(immediate_mask);
mBuffer->drawArrays(mMode, 0, mCount);
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 1067c3f1d5..e12776f83a 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -826,9 +826,6 @@ void LLAccordionCtrlTab::draw()
LLLocalClipRect clip(child_rect);
drawChild(root_rect,mContainerPanel);
}
-
-
- gGL.getTexUnit(0)->disable();
}
}
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index cbd4cb380f..400b899ef2 100644
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -103,9 +103,11 @@ BOOL LLClipboard::canPasteString() const
void LLClipboard::copyFromPrimarySubstring(const LLWString &src, S32 pos, S32 len, const LLUUID& source_id )
{
+#if !LL_DARWIN
mSourceID = source_id;
mString = src.substr(pos, len);
LLView::getWindow()->copyTextToPrimary( mString );
+#endif
}
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 9134adc6d1..28ca83ad48 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -212,7 +212,7 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
// Counterclockwise quad will face the viewer
if( filled )
- {
+ {
gGL.begin( LLRender::QUADS );
gGL.vertex2i(left, top);
gGL.vertex2i(left, bottom);
@@ -513,8 +513,8 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
if (solid_color)
{
- gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
- gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
+ //gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
+ //gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
}
gGL.pushUIMatrix();
@@ -650,7 +650,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
if (solid_color)
{
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ //gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
}
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index d34083a384..d0dbc99bc7 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1325,7 +1325,6 @@ void LLView::drawChildren()
localRectToScreen(viewp->getRect(),&screenRect);
if ( rootRect.overlaps(screenRect) && LLUI::sDirtyRect.overlaps(screenRect))
{
- glMatrixMode(GL_MODELVIEW);
LLUI::pushMatrix();
{
LLUI::translate((F32)viewp->getRect().mLeft, (F32)viewp->getRect().mBottom, 0.f);
@@ -1349,8 +1348,6 @@ void LLView::drawChildren()
}
--sDepth;
}
-
- gGL.getTexUnit(0)->disable();
}
void LLView::dirtyRect()