Skip to content

Commit a895f4e

Browse files
committed
viewer#2999 Fix debug text flicker
1 parent afa1305 commit a895f4e

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

indra/newview/llhudnametag.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,6 @@ void LLHUDNameTag::renderText()
291291
LLVector3 render_position = mPositionAgent
292292
+ (x_pixel_vec * screen_offset.mV[VX])
293293
+ (y_pixel_vec * screen_offset.mV[VY]);
294-
bool reset_buffers = false;
295-
const F32 treshold = 0.000001f;
296-
if (abs(mLastRenderPosition.mV[VX] - render_position.mV[VX]) > treshold
297-
|| abs(mLastRenderPosition.mV[VY] - render_position.mV[VY]) > treshold
298-
|| abs(mLastRenderPosition.mV[VZ] - render_position.mV[VZ]) > treshold)
299-
{
300-
reset_buffers = true;
301-
mLastRenderPosition = render_position;
302-
}
303294

304295
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
305296
LLRect screen_rect;
@@ -323,11 +314,6 @@ void LLHUDNameTag::renderText()
323314
for(std::vector<LLHUDTextSegment>::iterator segment_iter = mLabelSegments.begin();
324315
segment_iter != mLabelSegments.end(); ++segment_iter )
325316
{
326-
if (reset_buffers)
327-
{
328-
segment_iter->mFontBufferLabel.reset();
329-
}
330-
331317
// Label segments use default font
332318
const LLFontGL* fontp = (segment_iter->mStyle == LLFontGL::BOLD) ? mBoldFontp : mFontp;
333319
y_offset -= fontp->getLineHeight();
@@ -365,11 +351,6 @@ void LLHUDNameTag::renderText()
365351
for (std::vector<LLHUDTextSegment>::iterator segment_iter = mTextSegments.begin() + start_segment;
366352
segment_iter != mTextSegments.end(); ++segment_iter )
367353
{
368-
if (reset_buffers)
369-
{
370-
segment_iter->mFontBufferText.reset();
371-
}
372-
373354
const LLFontGL* fontp = segment_iter->mFont;
374355
y_offset -= fontp->getLineHeight();
375356
y_offset -= LINE_PADDING;

indra/newview/llhudtext.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,6 @@ void LLHUDText::renderText()
185185
LLVector3 render_position = mPositionAgent
186186
+ (x_pixel_vec * screen_offset.mV[VX])
187187
+ (y_pixel_vec * screen_offset.mV[VY]);
188-
bool reset_buffers = false;
189-
const F32 treshold = 0.000001f;
190-
if (abs(mLastRenderPosition.mV[VX] - render_position.mV[VX]) > treshold
191-
|| abs(mLastRenderPosition.mV[VY] - render_position.mV[VY]) > treshold
192-
|| abs(mLastRenderPosition.mV[VZ] - render_position.mV[VZ]) > treshold)
193-
{
194-
reset_buffers = true;
195-
mLastRenderPosition = render_position;
196-
}
197188

198189
F32 y_offset = (F32)mOffsetY;
199190

@@ -217,11 +208,6 @@ void LLHUDText::renderText()
217208
for (std::vector<LLHUDTextSegment>::iterator segment_iter = mTextSegments.begin() + start_segment;
218209
segment_iter != mTextSegments.end(); ++segment_iter )
219210
{
220-
if (reset_buffers)
221-
{
222-
segment_iter->mFontBufferText.reset();
223-
}
224-
225211
const LLFontGL* fontp = segment_iter->mFont;
226212
y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics
227213

indra/newview/llhudtext.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ class LLHUDText : public LLHUDObject
6767
LLColor4 mColor;
6868
LLFontGL::StyleFlags mStyle;
6969
const LLFontGL* mFont;
70-
LLFontVertexBuffer mFontBuffer;
7170
LLFontVertexBuffer mFontBufferText;
7271
private:
7372
LLWString mText;

0 commit comments

Comments
 (0)