diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-09-11 13:30:01 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-09-11 13:30:01 +0800 |
commit | 4f45656ca98a144155cb492ca30c92d051d47e4c (patch) | |
tree | 9642c33b24e98abd20768f15a185625be4a28230 /indra | |
parent | 930907de7821d8e9f0ae59fafcbb0a0837ad5f9f (diff) |
Preprocess non portable OpenGL 3.2 code
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llcubemap.cpp | 2 | ||||
-rw-r--r-- | indra/llrender/llgl.cpp | 2 | ||||
-rw-r--r-- | indra/llrender/llrender.cpp | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 254288a86e..bc5efbfce8 100644 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -211,7 +211,9 @@ void LLCubeMap::initEnvironmentMap(const std::vector<LLPointer<LLImageRaw> >& ra enableTexture(0); bind(); mImages[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC); +#if GL_VERSION_3_2 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); +#endif glGenerateMipmap(GL_TEXTURE_CUBE_MAP); gGL.getTexUnit(0)->disable(); disable(); diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 622e73228b..5d93145de9 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1226,10 +1226,12 @@ bool LLGLManager::initGL() } glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &mNumTextureImageUnits); +#if GL_VERSION_3_2 glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &mMaxColorTextureSamples); glGetIntegerv(GL_MAX_DEPTH_TEXTURE_SAMPLES, &mMaxDepthTextureSamples); glGetIntegerv(GL_MAX_INTEGER_SAMPLES, &mMaxIntegerSamples); glGetIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &mMaxSampleMaskWords); +#endif glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples); if (mGLVersion >= 4.59f) diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index f67d17cf6c..6356c04c6e 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -891,7 +891,9 @@ void LLRender::init(bool needs_vertex_buffer) glCullFace(GL_BACK); // necessary for reflection maps +#if GL_VERSION_3_2 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); +#endif { //bind a dummy vertex array object so we're core profile compliant U32 ret; |