summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchart2/source/view/main/OpenGLRender.cxx1
-rw-r--r--include/vcl/OpenGLContext.hxx4
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx4
3 files changed, 8 insertions, 1 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index ede3353a0ed3..72e0c2776553 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 4067febdf92d..390c3df45c27 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 66e16a583518..5f94c475e30a 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 )
{