From 55e81983562ca507883f32f817e9d24e1c49b909 Mon Sep 17 00:00:00 2001 From: Alex Sakhartchouk Date: Thu, 5 Aug 2010 11:24:14 -0700 Subject: Fixing fonts to use constant color instead of variable. Change-Id: Ia590dfed482f82b7bc748c25b7b1592efea5b68c --- libs/rs/rsContext.cpp | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) (limited to 'libs/rs/rsContext.cpp') diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 681f83e..dfdeb98 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -263,38 +263,18 @@ void Context::displayDebugStats() { char buffer[128]; sprintf(buffer, "Frame %i ms, Script %i ms", mTimeMSLastFrame, mTimeMSLastScript); - /*float oldR = mStateVertex.color[0]; - float oldG = mStateVertex.color[1]; - float oldB = mStateVertex.color[2]; - float oldA = mStateVertex.color[3];*/ + float oldR, oldG, oldB, oldA; + mStateFont.getFontColor(&oldR, &oldG, &oldB, &oldA); float shadowCol = 0.2f; - /*mStateVertex.color[0] = shadowCol; - mStateVertex.color[1] = shadowCol; - mStateVertex.color[2] = shadowCol; - mStateVertex.color[3] = 1.0f; - if (!checkVersion2_0()) { - glColor4f(shadowCol, shadowCol, shadowCol, 1.0f); - }*/ + mStateFont.setFontColor(shadowCol, shadowCol, shadowCol, 1.0f); mStateFont.renderText(buffer, 5, getHeight() - 5); - /*float textCol = 0.9f; - mStateVertex.color[0] = textCol; - mStateVertex.color[1] = textCol; - mStateVertex.color[2] = textCol; - mStateVertex.color[3] = 1.0f; - if (!checkVersion2_0()) { - glColor4f(textCol, textCol, textCol, 1.0f); - }*/ + float textCol = 0.9f; + mStateFont.setFontColor(textCol, textCol, textCol, 1.0f); mStateFont.renderText(buffer, 4, getHeight() - 6); - /*mStateVertex.color[0] = oldR; - mStateVertex.color[1] = oldG; - mStateVertex.color[2] = oldB; - mStateVertex.color[3] = oldA; - if (!checkVersion2_0()) { - glColor4f(oldR, oldG, oldB, oldA); - }*/ + mStateFont.setFontColor(oldR, oldG, oldB, oldA); } void * Context::threadProc(void *vrsc) -- cgit v1.1