[Libreoffice-commits] core.git: chart2/source include/vcl vcl/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Mon Mar 17 00:26:16 PDT 2014


 chart2/source/view/main/OpenGLRender.cxx |    1 +
 include/vcl/OpenGLContext.hxx            |    4 +++-
 vcl/source/opengl/OpenGLContext.cxx      |    4 ++++
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 418edcf057a2ea1f99d17ce424293b2acd48a6e9
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Mar 17 08:24:14 2014 +0100

    fix multisample support in OpenGL
    
    Change-Id: I7e530f5ae8d83d275df554781847b525b38bf4c7

diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index ede3353..72e0c27 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -235,6 +235,7 @@ GLfloat texCoords[] = {
 int OpenGLRender::InitOpenGL(GLWindow aWindow)
 {
     glWin = aWindow;
+    mbArbMultisampleSupported = glWin.bMultiSampleSupported;
     if(!bGlewInit)
     {
         glewExperimental = GL_TRUE;
diff --git a/include/vcl/OpenGLContext.hxx b/include/vcl/OpenGLContext.hxx
index 4067feb..390c3df 100644
--- a/include/vcl/OpenGLContext.hxx
+++ b/include/vcl/OpenGLContext.hxx
@@ -65,6 +65,7 @@ struct GLWindow
     unsigned int            Width;
     unsigned int            Height;
     const GLubyte*          GLExtensions;
+    bool bMultiSampleSupported;
 
     bool HasGLExtension( const char* name ) { return gluCheckExtension( (const GLubyte*) name, GLExtensions ); }
 
@@ -86,7 +87,8 @@ struct GLWindow
         bpp(0),
         Width(0),
         Height(0),
-        GLExtensions(NULL)
+        GLExtensions(NULL),
+        bMultiSampleSupported(false)
     {
     }
 };
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 66e16a5..5f94c47 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -369,6 +369,7 @@ bool OpenGLContext::init()
     bool bMultiSampleSupport = InitMultisample(PixelFormatFront, WindowPix);
     if (bMultiSampleSupport)
     {
+        m_aGLWin.bMultiSampleSupported = true;
     }
     else
     {
@@ -568,6 +569,9 @@ bool OpenGLContext::initWindow()
         XFree( pVi );
     }
 
+    if(best_num_samp > 0)
+        m_aGLWin.bMultiSampleSupported = true;
+
     XVisualInfo* vi = glXGetVisualFromFBConfig( m_aGLWin.dpy, pFBC[best_fbc] );
     if( vi )
     {


More information about the Libreoffice-commits mailing list