diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-14 10:12:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-14 12:39:42 +0200 |
commit | 8715a067a3547cf91a3ed73fd893a621d5ee1a1c (patch) | |
tree | 3d8ffc6834cce2f1372d31d2d364728e6eca4712 /slideshow | |
parent | 86d08e23f1b20b6582dd944b952b47cc737a7c52 (diff) |
Related: tdf#124729 check for GL_EXT_texture_filter_anisotropic support
Change-Id: I7cc7225c02e1c6688df22b237af59425fb64b79c
Reviewed-on: https://gerrit.libreoffice.org/80760
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/opengl/TransitionerImpl.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx index 2bec0badb196..3219e32f9abf 100644 --- a/slideshow/source/engine/opengl/TransitionerImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx @@ -836,10 +836,13 @@ void OGLTransitionerImpl::impl_createTexture( GL_UNSIGNED_BYTE, &tempBytes[0]); - //anistropic filtering (to make texturing not suck when looking at polygons from oblique angles) - GLfloat largest_supported_anisotropy; - glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy); + if (epoxy_has_gl_extension("GL_EXT_texture_filter_anisotropic")) + { + //anistropic filtering (to make texturing not suck when looking at polygons from oblique angles) + GLfloat largest_supported_anisotropy; + glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy); + } } else { if( mpTransition && !mbBrokenTexturesATI && !useMipmap) { glTexImage2D( GL_TEXTURE_2D, 0, pFormat->nInternalFormat, maSlideSize.Width, maSlideSize.Height, 0, pFormat->eFormat, pFormat->eType, &data[0] ); @@ -848,10 +851,13 @@ void OGLTransitionerImpl::impl_createTexture( } else { buildMipmaps( pFormat->nInternalFormat, maSlideSize.Width, maSlideSize.Height, pFormat->eFormat, pFormat->eType, &data[0] ); - //anistropic filtering (to make texturing not suck when looking at polygons from oblique angles) - GLfloat largest_supported_anisotropy; - glGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy ); - glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy ); + if (epoxy_has_gl_extension("GL_EXT_texture_filter_anisotropic")) + { + //anistropic filtering (to make texturing not suck when looking at polygons from oblique angles) + GLfloat largest_supported_anisotropy; + glGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy ); + glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy ); + } } } CHECK_GL_ERROR(); |