diff options
author | Dave Parks <davep@lindenlab.com> | 2011-08-10 14:50:11 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-08-10 14:50:11 -0500 |
commit | 265db1f17c74c8e21a532e2e85a623383ef84728 (patch) | |
tree | 98d3771410e4b96af9009dd6566d1481d07e8bd2 /indra/newview/llviewerwindow.cpp | |
parent | 17f46868d28876b65adcf24a45e6c19a20f2834c (diff) | |
parent | db92b0369194f1a81b92fd3fa72458eb0c1d2f20 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8d4f9b346f..9f66c074fd 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1720,10 +1720,7 @@ void LLViewerWindow::initGLDefaults() glCullFace(GL_BACK); // RN: Need this for translation and stretch manip. - gCone.prerender(); gBox.prerender(); - gSphere.prerender(); - gCylinder.prerender(); } struct MainPanel : public LLPanel @@ -2233,6 +2230,10 @@ void LLViewerWindow::drawDebugText() gGL.color4f(1,1,1,1); gGL.pushMatrix(); gGL.pushUIMatrix(); + if (LLGLSLShader::sNoFixedFunction) + { + gUIProgram.bind(); + } { // scale view by UI global scale factor and aspect ratio correction factor gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f); @@ -2242,6 +2243,10 @@ void LLViewerWindow::drawDebugText() gGL.popMatrix(); gGL.flush(); + if (LLGLSLShader::sNoFixedFunction) + { + gUIProgram.unbind(); + } } void LLViewerWindow::draw() @@ -3441,26 +3446,26 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, if (drawable && drawable->isLight()) { LLVOVolume* vovolume = drawable->getVOVolume(); - glPushMatrix(); + gGL.pushMatrix(); LLVector3 center = drawable->getPositionAgent(); - glTranslatef(center[0], center[1], center[2]); + gGL.translatef(center[0], center[1], center[2]); F32 scale = vovolume->getLightRadius(); - glScalef(scale, scale, scale); + gGL.scalef(scale, scale, scale); LLColor4 color(vovolume->getLightColor(), .5f); - glColor4fv(color.mV); + gGL.color4fv(color.mV); F32 pixel_area = 100000.f; // Render Outside - gSphere.render(pixel_area); + gSphere.render(); // Render Inside glCullFace(GL_FRONT); - gSphere.render(pixel_area); + gSphere.render(); glCullFace(GL_BACK); - glPopMatrix(); + gGL.popMatrix(); } return true; } @@ -4635,10 +4640,7 @@ void LLViewerWindow::stopGL(BOOL save_state) gPipeline.destroyGL(); } - gCone.cleanupGL(); gBox.cleanupGL(); - gSphere.cleanupGL(); - gCylinder.cleanupGL(); if(gPostProcess) { |