diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-05-16 20:31:29 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-05-16 20:31:29 -0500 |
commit | ee0b330b2d6a3433e3bac6ab21cf6cc3e580c605 (patch) | |
tree | 2ac68911188c025b3564d977d11e9e5e4de5c934 /indra/newview | |
parent | a256a18884ae8e4bc6297ca59fbd5936089ad59c (diff) |
DRTVWR-559 Decruft deprecated OpenGL flags.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolsimple.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpooltree.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterimagepreview.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llhudnametag.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llhudtext.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llmaniprotate.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llmanipscale.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llmaniptranslate.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llmodelpreview.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 3 | ||||
-rw-r--r-- | indra/newview/lltracker.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerjointmesh.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 10 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 14 |
14 files changed, 5 insertions, 45 deletions
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index 3cc101b325..a89c9d4561 100644 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -79,7 +79,6 @@ void LLDrawPoolGlow::renderPostDeferred(S32 pass) LLGLSLShader* shader = &gDeferredEmissiveProgram; LLGLEnable blend(GL_BLEND); - LLGLDisable test(GL_ALPHA_TEST); gGL.flush(); /// Get rid of z-fighting with non-glow pass. LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL); @@ -132,7 +131,6 @@ void LLDrawPoolSimple::renderDeferred(S32 pass) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SIMPLE_DEFERRED); LLGLDisable blend(GL_BLEND); - LLGLDisable alpha_test(GL_ALPHA_TEST); //render static setup_simple_shader(&gDeferredDiffuseProgram); diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 57146c432a..9dcbc48697 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -71,7 +71,6 @@ void LLDrawPoolTree::renderDeferred(S32 pass) return; } - LLGLState test(GL_ALPHA_TEST, 0); gGL.getTexUnit(sDiffTex)->bindFast(mTexturep); mTexturep->addTextureStats(1024.f * 1024.f); // <=== keep Linden tree textures at full res diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 6b0ba44624..ba0f97e2e1 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -251,7 +251,6 @@ void LLFloaterImagePreview::draw() if (selected <= 0) { gl_rect_2d_checkerboard(mPreviewRect); - LLGLDisable gls_alpha(GL_ALPHA_TEST); if(mImagep.notNull()) { diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 0408cfc659..26fc899eb5 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -258,7 +258,6 @@ void LLHUDNameTag::renderText(BOOL for_select) } LLGLState gls_blend(GL_BLEND, for_select ? FALSE : TRUE); - LLGLState gls_alpha(GL_ALPHA_TEST, for_select ? FALSE : TRUE); LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 22dca07096..0b0de18534 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -117,7 +117,6 @@ void LLHUDText::renderText() gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); LLGLState gls_blend(GL_BLEND, TRUE); - LLGLState gls_alpha(GL_ALPHA_TEST, TRUE); LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; @@ -575,7 +574,6 @@ void LLHUDText::renderAllHUD() LLGLState::checkStates(); { - LLGLEnable color_mat(GL_COLOR_MATERIAL); LLGLDepthTest depth(GL_FALSE, GL_FALSE); VisibleTextObjectIterator text_it; diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 6b9543d433..886abfb132 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -118,7 +118,6 @@ void LLManipRotate::render() gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep); LLGLDepthTest gls_depth(GL_TRUE); LLGLEnable gl_blend(GL_BLEND); - LLGLEnable gls_alpha_test(GL_ALPHA_TEST); // You can rotate if you can move LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(TRUE); diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index c15f1da26b..6f685d4e62 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -212,7 +212,6 @@ void LLManipScale::render() gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLDepthTest gls_depth(GL_TRUE); LLGLEnable gl_blend(GL_BLEND); - LLGLEnable gls_alpha_test(GL_ALPHA_TEST); LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); if( canAffectSelection() ) @@ -1317,11 +1316,11 @@ void LLManipScale::renderGuidelinesPart( const LLBBox& bbox ) { LLGLDepthTest gls_depth(GL_TRUE); - gl_stippled_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.5f) ); + gl_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.5f) ); } { LLGLDepthTest gls_depth(GL_FALSE); - gl_stippled_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.25f) ); + gl_line_3d( guideline_start, guideline_end, LLColor4(1.f, 1.f, 1.f, 0.25f) ); } } diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 91f1af8f28..cafb3fef67 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -1537,7 +1537,6 @@ void LLManipTranslate::renderSnapGuides() } { - LLGLDisable alpha_test(GL_ALPHA_TEST); //draw black overlay gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); renderGrid(u,v,tiles,0.0f, 0.0f, 0.0f,a*0.16f); @@ -1558,7 +1557,6 @@ void LLManipTranslate::renderSnapGuides() { LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GREATER); - LLGLEnable stipple(GL_LINE_STIPPLE); gGL.flush(); switch (mManipPart) @@ -2182,7 +2180,6 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_ { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLEnable gls_blend(GL_BLEND); - LLGLEnable gls_color_material(GL_COLOR_MATERIAL); for (S32 pass = 1; pass <= 2; pass++) { diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 7ae48eef8c..5f910d95c2 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -3096,7 +3096,7 @@ BOOL LLModelPreview::render() S32 width = getWidth(); S32 height = getHeight(); - LLGLSUIDefault def; // GL_BLEND, GL_ALPHA_TEST, GL_CULL_FACE, depth test + LLGLSUIDefault def; LLGLDisable no_blend(GL_BLEND); LLGLEnable cull(GL_CULL_FACE); LLGLDepthTest depth(GL_FALSE); // SL-12781 disable z-buffer to render background color @@ -3301,8 +3301,6 @@ BOOL LLModelPreview::render() gGL.pushMatrix(); gGL.color4fv(PREVIEW_EDGE_COL.mV); - LLGLEnable normalize(GL_NORMALIZE); - if (!mBaseModel.empty() && mVertexBuffer[5].empty()) { genBuffers(-1, skin_weight); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 71dcc56197..dca341e5a2 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6288,9 +6288,6 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor) { - //Need to because crash on ATI 3800 (and similar cards) MAINT-5018 - LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); - LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; if (shader) diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index ab4ad5817b..4c55ea1fc6 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -588,7 +588,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global, LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(pos_global); - LLGLSTracker gls_tracker; // default+ CULL_FACE + LIGHTING + GL_BLEND + GL_ALPHA_TEST + LLGLSTracker gls_tracker; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLDisable cull_face(GL_CULL_FACE); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 5ce8f4023d..5d46c695b7 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -39,7 +39,6 @@ #include "lldrawpoolbump.h" #include "lldynamictexture.h" #include "llface.h" -#include "llgldbg.h" #include "llglheaders.h" #include "llviewertexlayer.h" #include "llviewercamera.h" diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index af65588709..341ef57d8c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5112,9 +5112,6 @@ U32 LLVOAvatar::renderSkinned() // render all geometry attached to the skeleton //-------------------------------------------------------------------- - bool should_alpha_mask = shouldAlphaMask(); - LLGLState test(GL_ALPHA_TEST, should_alpha_mask); - BOOL first_pass = TRUE; if (!LLDrawPoolAvatar::sSkipOpaque) { @@ -5164,7 +5161,6 @@ U32 LLVOAvatar::renderSkinned() if (!LLDrawPoolAvatar::sSkipTransparent || LLPipeline::sImpostorRender) { LLGLState blend(GL_BLEND, !mIsDummy); - LLGLState test(GL_ALPHA_TEST, !mIsDummy); num_indices += renderTransparent(first_pass); } @@ -5242,9 +5238,6 @@ U32 LLVOAvatar::renderRigid() return 0; } - bool should_alpha_mask = shouldAlphaMask(); - LLGLState test(GL_ALPHA_TEST, should_alpha_mask); - if (isTextureVisible(TEX_EYES_BAKED) || (getOverallAppearance() == AOA_JELLYDOLL && !isControlAvatar()) || isUIAvatar()) { LLViewerJoint* eyeball_left = getViewerJoint(MESH_ID_EYEBALL_LEFT); @@ -5308,8 +5301,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) gGL.flush(); } { - LLGLEnable test(GL_ALPHA_TEST); - gGL.flush(); + gGL.flush(); gGL.color4ubv(color.mV); gGL.getTexUnit(diffuse_channel)->bind(&mImpostor); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 99deae309d..7f1db9b61e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -63,7 +63,6 @@ #include "llfeaturemanager.h" #include "llfloatertelehub.h" #include "llfloaterreg.h" -#include "llgldbg.h" #include "llhudmanager.h" #include "llhudnametag.h" #include "llhudtext.h" @@ -2428,7 +2427,6 @@ void LLPipeline::doOcclusion(LLCamera& camera) gGL.setColorMask(false, false); LLGLDisable blend(GL_BLEND); - LLGLDisable test(GL_ALPHA_TEST); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLDepthTest depth(GL_TRUE, GL_FALSE); @@ -3742,7 +3740,6 @@ void render_hud_elements() if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d() // Draw the tracking overlays @@ -3777,7 +3774,6 @@ void LLPipeline::renderHighlights() // Render highlighted faces. LLGLSPipelineAlpha gls_pipeline_alpha; LLColor4 color(1.f, 1.f, 1.f, 0.5f); - LLGLEnable color_mat(GL_COLOR_MATERIAL); disableLights(); if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0)) @@ -3947,8 +3943,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion) } } - LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); - LLVertexBuffer::unbind(); LLGLState::checkStates(); @@ -4055,8 +4049,6 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) LLGLEnable cull(GL_CULL_FACE); - LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); - calcNearbyLights(camera); setupHWLights(); @@ -7140,7 +7132,6 @@ void LLPipeline::generateGlow(LLRenderTarget* src) { LLGLEnable blend_on(GL_BLEND); - LLGLEnable test(GL_ALPHA_TEST); gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); @@ -7559,8 +7550,6 @@ void LLPipeline::renderFinalize() enableLightsFullbright(); - LLGLDisable test(GL_ALPHA_TEST); - gGL.setColorMask(true, true); glClearColor(0, 0, 0, 0); @@ -7971,8 +7960,6 @@ void LLPipeline::renderDeferredLighting() LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("deferred"); LLViewerCamera *camera = LLViewerCamera::getInstance(); - LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE : 0); - if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD)) { gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_HUD); @@ -8133,7 +8120,6 @@ void LLPipeline::renderDeferredLighting() { LLGLDepthTest depth(GL_FALSE); LLGLDisable blend(GL_BLEND); - LLGLDisable test(GL_ALPHA_TEST); // full screen blit mScreenTriangleVB->setBuffer(); |