summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-11 13:36:53 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-11 13:36:53 +0800
commit5dd6cf2db9c6aaaf7337161db85a8920b1b7d835 (patch)
treef3831929a0f72cfc29c34a42244c36a3b4c101a4 /indra/llrender
parentaf2a0ae3bc3674fe20bc9eac8f3c9449e329372f (diff)
Preprocess non portable OpenGL 3.0 code
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 10dca0b932..867b4b6761 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -238,7 +238,9 @@ void LLGLSLShader::placeProfileQuery(bool for_runtime)
if (!for_runtime)
{
glBeginQuery(GL_SAMPLES_PASSED, mSamplesQuery);
+#if GL_VERSION_3_0
glBeginQuery(GL_PRIMITIVES_GENERATED, mPrimitivesQuery);
+#endif
}
}
}
@@ -253,7 +255,9 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read)
if (!for_runtime)
{
glEndQuery(GL_SAMPLES_PASSED);
+#if GL_VERSION_3_0
glEndQuery(GL_PRIMITIVES_GENERATED);
+#endif
}
mProfilePending = for_runtime;
}