Repository.mk | 2 - chart2/Module_chart2.mk | 6 +---- chart2/source/view/main/GL3DRenderer.cxx | 34 ------------------------------- chart2/source/view/main/OpenGLRender.cxx | 4 +-- include/vcl/opengl/OpenGLHelper.hxx | 2 + vcl/source/opengl/OpenGLHelper.cxx | 32 +++++++++++++++++++++++++++++ 6 files changed, 40 insertions(+), 40 deletions(-)
New commits: commit 31b0eb64430eadec6d594354afc0d7b9551ae409 Author: Tor Lillqvist <t...@collabora.com> Date: Tue Apr 29 08:28:54 2014 +0300 Use OpenGLHelper::GLErrorString() Change-Id: I45f627b20c4cfdd3048d7b1716af882ddd0d82b9 diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 3807ede..b9b7201 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -42,38 +42,6 @@ struct TextInfo float nDy; }; -static const char* errorString(GLenum errorCode) -{ - static const struct { - GLenum code; - const char *string; - } errors[]= - { - /* GL */ - {GL_NO_ERROR, "no error"}, - {GL_INVALID_ENUM, "invalid enumerant"}, - {GL_INVALID_VALUE, "invalid value"}, - {GL_INVALID_OPERATION, "invalid operation"}, - {GL_STACK_OVERFLOW, "stack overflow"}, - {GL_STACK_UNDERFLOW, "stack underflow"}, - {GL_OUT_OF_MEMORY, "out of memory"}, - - {0, NULL } - }; - - int i; - - for (i=0; errors[i].string; i++) - { - if (errors[i].code == errorCode) - { - return errors[i].string; - } - } - - return NULL; -} - int static checkGLError(const char *file, int line) { GLenum glErr; @@ -81,7 +49,7 @@ int static checkGLError(const char *file, int line) glErr = glGetError(); while (glErr != GL_NO_ERROR) { - const char* sError = errorString(glErr); + const char* sError = OpenGLHelper::GLErrorString(glErr); if (sError) SAL_WARN("chart2.opengl", "GL Error #" << glErr << "(" << sError << ") " << " in File " << file << " at line: " << line); diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 96368cd..2b7eab1 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -84,10 +84,10 @@ int static checkGLError(const char *file, int line) glErr = glGetError(); while (glErr != GL_NO_ERROR) { - const GLubyte* sError = gluErrorString(glErr); + const char* sError = OpenGLHelper::GLErrorString(glErr); if (sError) - SAL_WARN("chart2.opengl", "GL Error #" << glErr << "(" << gluErrorString(glErr) << ") " << " in File " << file << " at line: " << line); + SAL_WARN("chart2.opengl", "GL Error #" << glErr << "(" << sError << ") " << " in File " << file << " at line: " << line); else SAL_WARN("chart2.opengl", "GL Error #" << glErr << " (no message available)" << " in File " << file << " at line: " << line); commit 47a99f19bb9d46eb617c71703d5548523fe72d11 Author: Tor Lillqvist <t...@collabora.com> Date: Tue Apr 29 08:27:58 2014 +0300 Add gluErrorString() replacement to OpenGLHelper Change-Id: I1a04ece7026ceff75456df03b4eb189a3cb9687f diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx index 7fa7d84..3530b2b 100644 --- a/include/vcl/opengl/OpenGLHelper.hxx +++ b/include/vcl/opengl/OpenGLHelper.hxx @@ -23,6 +23,8 @@ public: static sal_uInt8* ConvertBitmapExToRGBABuffer(const BitmapEx& rBitmapEx); static BitmapEx ConvertBGRABufferToBitmapEx(const sal_uInt8* const pBuffer, long nWidth, long nHeight); + + static const char* GLErrorString(GLenum errorCode); }; #endif diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 82b4a9a..0ed24d0 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -197,4 +197,36 @@ BitmapEx OpenGLHelper::ConvertBGRABufferToBitmapEx(const sal_uInt8* const pBuffe return BitmapEx(aBitmap, aAlpha); } +const char* OpenGLHelper::GLErrorString(GLenum errorCode) +{ + static const struct { + GLenum code; + const char *string; + } errors[]= + { + /* GL */ + {GL_NO_ERROR, "no error"}, + {GL_INVALID_ENUM, "invalid enumerant"}, + {GL_INVALID_VALUE, "invalid value"}, + {GL_INVALID_OPERATION, "invalid operation"}, + {GL_STACK_OVERFLOW, "stack overflow"}, + {GL_STACK_UNDERFLOW, "stack underflow"}, + {GL_OUT_OF_MEMORY, "out of memory"}, + + {0, NULL } + }; + + int i; + + for (i=0; errors[i].string; i++) + { + if (errors[i].code == errorCode) + { + return errors[i].string; + } + } + + return NULL; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 20fc0ed8fa5765d3e13e5351c03993c3ff6c2732 Author: Tor Lillqvist <t...@collabora.com> Date: Tue Apr 29 08:25:38 2014 +0300 Build libchartopengl for all platforms That doesn't mean it would need to be used on iOS or Android, if we don't need/want to. Change-Id: Ia6ac6f32cac3f6958f5ec240ec4be369474edfb8 diff --git a/Repository.mk b/Repository.mk index 589d49a..46d2783 100644 --- a/Repository.mk +++ b/Repository.mk @@ -221,7 +221,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ canvastools \ chartcore \ chartcontroller \ - $(if $(filter FREEBSD LINUX MACOSX WNT,$(OS)),chartopengl) \ + chartopengl \ $(if $(filter $(OS),MACOSX WNT),,cmdmail) \ cppcanvas \ configmgr \ diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk index dba9506..16a74a1 100644 --- a/chart2/Module_chart2.mk +++ b/chart2/Module_chart2.mk @@ -12,10 +12,8 @@ $(eval $(call gb_Module_Module,chart2)) $(eval $(call gb_Module_add_targets,chart2,\ Library_chartcontroller \ Library_chartcore \ - $(if $(filter FREEBSD LINUX MACOSX WNT,$(OS)), \ - Library_chartopengl \ - Package_opengl \ - ) \ + Library_chartopengl \ + Package_opengl \ )) $(eval $(call gb_Module_add_l10n_targets,chart2,\ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits