diff options
Diffstat (limited to 'linden/indra/newview/llviewerdisplay.cpp')
-rw-r--r-- | linden/indra/newview/llviewerdisplay.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index ae23cb5..cdffe33 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp | |||
@@ -147,9 +147,11 @@ void display_startup() | |||
147 | gViewerWindow->setup2DRender(); | 147 | gViewerWindow->setup2DRender(); |
148 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); | 148 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); |
149 | 149 | ||
150 | gGL.start(); | 150 | gGL.color4f(1,1,1,1); |
151 | gViewerWindow->draw(); | 151 | gViewerWindow->draw(); |
152 | gGL.stop(); | 152 | gGL.flush(); |
153 | |||
154 | LLVertexBuffer::unbind(); | ||
153 | 155 | ||
154 | #ifndef LL_RELEASE_FOR_DOWNLOAD | 156 | #ifndef LL_RELEASE_FOR_DOWNLOAD |
155 | LLGLState::checkStates(); | 157 | LLGLState::checkStates(); |
@@ -199,12 +201,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
199 | 201 | ||
200 | LLGLSDefault gls_default; | 202 | LLGLSDefault gls_default; |
201 | LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE, GL_LEQUAL); | 203 | LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE, GL_LEQUAL); |
202 | |||
203 | // No clue where this is getting unset, but safe enough to reset it here. | ||
204 | //this causes frame stalls, try real hard not to uncomment this line - DaveP | ||
205 | //LLGLState::resetTextureStates(); | ||
206 | |||
207 | 204 | ||
205 | LLVertexBuffer::unbind(); | ||
206 | |||
208 | #ifndef LL_RELEASE_FOR_DOWNLOAD | 207 | #ifndef LL_RELEASE_FOR_DOWNLOAD |
209 | LLGLState::checkStates(); | 208 | LLGLState::checkStates(); |
210 | LLGLState::checkTextureChannels(); | 209 | LLGLState::checkTextureChannels(); |
@@ -676,7 +675,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
676 | // glTranslatef(0.f, 0.f, -LLViewerCamera::getInstance()->getNear()); | 675 | // glTranslatef(0.f, 0.f, -LLViewerCamera::getInstance()->getNear()); |
677 | // glScalef(LLViewerCamera::getInstance()->getNear() * LLViewerCamera::getInstance()->getAspect() / sinf(LLViewerCamera::getInstance()->getView()), LLViewerCamera::getInstance()->getNear() / sinf(LLViewerCamera::getInstance()->getView()), 1.f); | 676 | // glScalef(LLViewerCamera::getInstance()->getNear() * LLViewerCamera::getInstance()->getAspect() / sinf(LLViewerCamera::getInstance()->getView()), LLViewerCamera::getInstance()->getNear() / sinf(LLViewerCamera::getInstance()->getView()), 1.f); |
678 | // gGL.color4fv(LLColor4::white.mV); | 677 | // gGL.color4fv(LLColor4::white.mV); |
679 | // gGL.begin(GL_QUADS); | 678 | // gGL.begin(LLVertexBuffer::QUADS); |
680 | // { | 679 | // { |
681 | // gGL.vertex3f(floater_3d_rect.mLeft, floater_3d_rect.mBottom, 0.f); | 680 | // gGL.vertex3f(floater_3d_rect.mLeft, floater_3d_rect.mBottom, 0.f); |
682 | // gGL.vertex3f(floater_3d_rect.mLeft, floater_3d_rect.mTop, 0.f); | 681 | // gGL.vertex3f(floater_3d_rect.mLeft, floater_3d_rect.mTop, 0.f); |
@@ -910,8 +909,8 @@ void render_ui_and_swap() | |||
910 | } | 909 | } |
911 | 910 | ||
912 | { | 911 | { |
913 | LLVertexBuffer::startRender(); | 912 | |
914 | gGL.start(); | 913 | gGL.color4f(1,1,1,1); |
915 | if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) | 914 | if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) |
916 | { | 915 | { |
917 | LLFastTimer t(LLFastTimer::FTM_RENDER_UI); | 916 | LLFastTimer t(LLFastTimer::FTM_RENDER_UI); |
@@ -929,7 +928,7 @@ void render_ui_and_swap() | |||
929 | LLGLState::checkStates(); | 928 | LLGLState::checkStates(); |
930 | #endif | 929 | #endif |
931 | } | 930 | } |
932 | gGL.stop(); | 931 | gGL.flush(); |
933 | 932 | ||
934 | { | 933 | { |
935 | gViewerWindow->setup2DRender(); | 934 | gViewerWindow->setup2DRender(); |
@@ -937,7 +936,7 @@ void render_ui_and_swap() | |||
937 | gViewerWindow->drawDebugText(); | 936 | gViewerWindow->drawDebugText(); |
938 | } | 937 | } |
939 | 938 | ||
940 | LLVertexBuffer::stopRender(); | 939 | LLVertexBuffer::unbind(); |
941 | } | 940 | } |
942 | 941 | ||
943 | glh_set_current_modelview(saved_view); | 942 | glh_set_current_modelview(saved_view); |
@@ -960,7 +959,7 @@ void render_ui_and_swap_if_needed() | |||
960 | void renderCoordinateAxes() | 959 | void renderCoordinateAxes() |
961 | { | 960 | { |
962 | LLGLSNoTexture gls_no_texture; | 961 | LLGLSNoTexture gls_no_texture; |
963 | gGL.begin(GL_LINES); | 962 | gGL.begin(LLVertexBuffer::LINES); |
964 | gGL.color3f(1.0f, 0.0f, 0.0f); // i direction = X-Axis = red | 963 | gGL.color3f(1.0f, 0.0f, 0.0f); // i direction = X-Axis = red |
965 | gGL.vertex3f(0.0f, 0.0f, 0.0f); | 964 | gGL.vertex3f(0.0f, 0.0f, 0.0f); |
966 | gGL.vertex3f(2.0f, 0.0f, 0.0f); | 965 | gGL.vertex3f(2.0f, 0.0f, 0.0f); |
@@ -1013,7 +1012,7 @@ void draw_axes() | |||
1013 | LLGLSNoTexture gls_no_texture; | 1012 | LLGLSNoTexture gls_no_texture; |
1014 | // A vertical white line at origin | 1013 | // A vertical white line at origin |
1015 | LLVector3 v = gAgent.getPositionAgent(); | 1014 | LLVector3 v = gAgent.getPositionAgent(); |
1016 | gGL.begin(GL_LINES); | 1015 | gGL.begin(LLVertexBuffer::LINES); |
1017 | gGL.color3f(1.0f, 1.0f, 1.0f); | 1016 | gGL.color3f(1.0f, 1.0f, 1.0f); |
1018 | gGL.vertex3f(0.0f, 0.0f, 0.0f); | 1017 | gGL.vertex3f(0.0f, 0.0f, 0.0f); |
1019 | gGL.vertex3f(0.0f, 0.0f, 40.0f); | 1018 | gGL.vertex3f(0.0f, 0.0f, 40.0f); |
@@ -1119,7 +1118,7 @@ void render_ui_2d() | |||
1119 | 1118 | ||
1120 | void render_disconnected_background() | 1119 | void render_disconnected_background() |
1121 | { | 1120 | { |
1122 | gGL.start(); | 1121 | gGL.color4f(1,1,1,1); |
1123 | if (!gDisconnectedImagep && gDisconnected) | 1122 | if (!gDisconnectedImagep && gDisconnected) |
1124 | { | 1123 | { |
1125 | llinfos << "Loading last bitmap..." << llendl; | 1124 | llinfos << "Loading last bitmap..." << llendl; |
@@ -1192,7 +1191,7 @@ void render_disconnected_background() | |||
1192 | } | 1191 | } |
1193 | glPopMatrix(); | 1192 | glPopMatrix(); |
1194 | } | 1193 | } |
1195 | gGL.stop(); | 1194 | gGL.flush(); |
1196 | } | 1195 | } |
1197 | 1196 | ||
1198 | void display_cleanup() | 1197 | void display_cleanup() |