diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-11-25 20:25:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-13 11:33:18 +0000 |
commit | 482d7ce61b423600b41b459eb26a2cc221cd0acf (patch) | |
tree | 8da6edb8200889d93f0b344e61ed779c037a590f /chart2 | |
parent | 178e38dd82a2cffb2db747c7be82ba7a48338968 (diff) |
change from glew to epoxy
because that works under wayland out of the box and gtk3 uses it already
Change-Id: Iefaac31e325534a81a5389f752804af917c1baef
Reviewed-on: https://gerrit.libreoffice.org/31213
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/Library_chartcore.mk | 9 | ||||
-rw-r--r-- | chart2/Library_chartopengl.mk | 4 | ||||
-rw-r--r-- | chart2/inc/pch/precompiled_chartcore.hxx | 2 | ||||
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/GL3DRenderer.cxx | 8 | ||||
-rw-r--r-- | chart2/source/view/main/OpenGLRender.cxx | 2 |
6 files changed, 9 insertions, 18 deletions
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk index b15f6349e17d..cc06fbddb6e6 100644 --- a/chart2/Library_chartcore.mk +++ b/chart2/Library_chartcore.mk @@ -32,7 +32,7 @@ $(eval $(call gb_Library_use_externals,chartcore,\ ifeq ($(ENABLE_HEADLESS),) $(eval $(call gb_Library_use_externals,chartcore,\ - glew \ + epoxy \ )) endif @@ -264,13 +264,6 @@ else ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS))) $(eval $(call gb_Library_add_libs,chartcore,\ $(DLOPEN_LIBS) \ )) -ifeq ($(ENABLE_HEADLESS),) -$(eval $(call gb_Library_add_libs,chartcore,\ - -lGL \ - -lX11 \ -)) -endif #!ENABLE_HEADLESS - endif # vim: set noet sw=4 ts=4: diff --git a/chart2/Library_chartopengl.mk b/chart2/Library_chartopengl.mk index 95ea58d8562a..53056aafe0e0 100644 --- a/chart2/Library_chartopengl.mk +++ b/chart2/Library_chartopengl.mk @@ -22,7 +22,7 @@ $(eval $(call gb_Library_set_precompiled_header,chartopengl,$(SRCDIR)/chart2/inc $(eval $(call gb_Library_use_externals,chartopengl,\ boost_headers \ glm_headers \ - glew \ + epoxy \ )) $(eval $(call gb_Library_use_sdk_api,chartopengl)) @@ -68,8 +68,6 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,chartopengl,\ else ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS))) $(eval $(call gb_Library_add_libs,chartopengl,\ $(DLOPEN_LIBS) \ - -lGL \ - -lX11 \ )) endif diff --git a/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx index 8d024511efc3..908d7acb4216 100644 --- a/chart2/inc/pch/precompiled_chartcore.hxx +++ b/chart2/inc/pch/precompiled_chartcore.hxx @@ -73,7 +73,6 @@ #include <vcl/virdev.hxx> #include <vcl/wall.hxx> #include <ChartModel.hxx> -#include <GL/glew.h> #include <basegfx/basegfxdllapi.h> #include <basegfx/matrix/b3dhommatrix.hxx> #include <basegfx/numeric/ftools.hxx> @@ -169,6 +168,7 @@ #include <cppuhelper/weak.hxx> #include <editeng/editengdllapi.h> #include <editeng/unoprnms.hxx> +#include <epoxy/gl.h> #include <i18nlangtag/i18nlangtagdllapi.h> #include <i18nlangtag/lang.h> #include <i18nlangtag/languagetag.hxx> diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index a4193da2e1ac..401b66428805 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -9,7 +9,7 @@ #include <GL3DBarChart.hxx> -#include <GL/glew.h> +#include <epoxy/gl.h> #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index fb4fb137c929..e1e4c01673e8 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <GL/glew.h> +#include <epoxy/gl.h> #include "GL3DRenderer.hxx" @@ -244,8 +244,8 @@ void OpenGL3DRenderer::ShaderResources::LoadShaders() m_3DBatchNormalID = glGetAttribLocation(m_3DBatchProID, "vertexNormalModelspace"); m_3DBatchColorID = glGetAttribLocation(m_3DBatchProID, "barColor"); #if !defined MACOSX - //check whether the texture array is support - mbTexBatchSupport = GLEW_EXT_texture_array; + //check whether the texture array is supported + mbTexBatchSupport = epoxy_has_gl_extension("GL_EXT_texture_array"); #endif CHECK_GL_ERROR(); if (mbTexBatchSupport) @@ -401,7 +401,7 @@ void OpenGL3DRenderer::init() m_fViewAngle = 30.0f; m_3DProjection = glm::perspective(m_fViewAngle, (float)m_iWidth / (float)m_iHeight, 0.01f, 6000.0f); - maResources.m_b330Support = GLEW_VERSION_3_3; + maResources.m_b330Support = epoxy_gl_version() >= 33; CHECK_GL_ERROR(); maResources.LoadShaders(); maPickingResources.LoadShaders(); diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 3182e66de40a..91a3763ae640 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <GL/glew.h> +#include <epoxy/gl.h> #include <vector> #include "OpenGLRender.hxx" #include <vcl/graph.hxx> |