From 040fe22d93fe67a73fc33493057f06f07371dbdd Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 10 Sep 2023 10:17:43 +0800 Subject: Preprocess non portable OpenGL code --- indra/newview/llvoavatar.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 305c489cc8..4a53f2b2cd 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5107,7 +5107,9 @@ U32 LLVOAvatar::renderSkinned() //-------------------------------------------------------------------- bool should_alpha_mask = shouldAlphaMask(); +#if GL_VERSION_1_1 LLGLState test(GL_ALPHA_TEST, should_alpha_mask); +#endif BOOL first_pass = TRUE; if (!LLDrawPoolAvatar::sSkipOpaque) @@ -5158,7 +5160,9 @@ U32 LLVOAvatar::renderSkinned() if (!LLDrawPoolAvatar::sSkipTransparent || LLPipeline::sImpostorRender) { LLGLState blend(GL_BLEND, !mIsDummy); +#if GL_VERSION_1_1 LLGLState test(GL_ALPHA_TEST, !mIsDummy); +#endif num_indices += renderTransparent(first_pass); } @@ -5237,7 +5241,9 @@ U32 LLVOAvatar::renderRigid() } bool should_alpha_mask = shouldAlphaMask(); +#if GL_VERSION_1_1 LLGLState test(GL_ALPHA_TEST, should_alpha_mask); +#endif if (isTextureVisible(TEX_EYES_BAKED) || (getOverallAppearance() == AOA_JELLYDOLL && !isControlAvatar()) || isUIAvatar()) { @@ -5302,7 +5308,9 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) gGL.flush(); } { +#if GL_VERSION_1_1 LLGLEnable test(GL_ALPHA_TEST); +#endif gGL.flush(); gGL.color4ubv(color.mV); -- cgit v1.2.3