summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-20 14:16:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-21 10:04:50 +0100
commit5d4e68d51eecfbe37e17f59cc7f7f042c69a65e9 (patch)
tree26676c62be78ba61a91ae9168cc806d7a23e5b9e /vcl/source/opengl
parent81283a891f274226113f6d136c251c2ba1538b4c (diff)
move glX stuff to X-only modules
Change-Id: I8ca818dac72f0368b6af10c838603e63c7c85b1e
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx85
1 files changed, 0 insertions, 85 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 47fe8feeb762..e6ea3a100f00 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -1062,91 +1062,6 @@ void OpenGLHelper::debugMsgPrint(const char *pFormat, ...)
va_end (aArgs);
}
-#if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS)
-
-bool OpenGLHelper::GetVisualInfo(Display* pDisplay, int nScreen, XVisualInfo& rVI)
-{
- OpenGLZone aZone;
-
- XVisualInfo* pVI;
- int aAttrib[] = { GLX_RGBA,
- GLX_RED_SIZE, 8,
- GLX_GREEN_SIZE, 8,
- GLX_BLUE_SIZE, 8,
- GLX_DEPTH_SIZE, 24,
- GLX_STENCIL_SIZE, 8,
- None };
-
- pVI = glXChooseVisual( pDisplay, nScreen, aAttrib );
- if( !pVI )
- return false;
-
- rVI = *pVI;
- XFree( pVI );
-
- CHECK_GL_ERROR();
- return true;
-}
-
-GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* pDisplay, bool& bInverted )
-{
- OpenGLZone aZone;
-
- int nScreen = DefaultScreen( pDisplay );
- GLXFBConfig *aFbConfigs;
- int i, nFbConfigs, nValue;
-
- aFbConfigs = glXGetFBConfigs( pDisplay, nScreen, &nFbConfigs );
- for( i = 0; i < nFbConfigs; i++ )
- {
- glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_DRAWABLE_TYPE, &nValue );
- if( !(nValue & GLX_PIXMAP_BIT) )
- continue;
-
- glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_BIND_TO_TEXTURE_TARGETS_EXT, &nValue );
- if( !(nValue & GLX_TEXTURE_2D_BIT_EXT) )
- continue;
-
- glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_DEPTH_SIZE, &nValue );
- if( nValue != 24 )
- continue;
-
- glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_RED_SIZE, &nValue );
- if( nValue != 8 )
- continue;
- SAL_INFO( "vcl.opengl", "Red is " << nValue );
-
- // TODO: lfrb: Make it configurable wrt RGB/RGBA
- glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_BIND_TO_TEXTURE_RGB_EXT, &nValue );
- if( nValue == False )
- {
- glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_BIND_TO_TEXTURE_RGBA_EXT, &nValue );
- if( nValue == False )
- continue;
- }
-
- glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_Y_INVERTED_EXT, &nValue );
-
- // Looks like that X sends GLX_DONT_CARE but this usually means "true" for most
- // of the X implementations. Investigation on internet pointed that this could be
- // safely "true" all the time (for example gnome-shell always assumes "true").
- bInverted = nValue == True || nValue == int(GLX_DONT_CARE);
-
- break;
- }
-
- if( i == nFbConfigs )
- {
- SAL_WARN( "vcl.opengl", "Unable to find FBconfig for pixmap texturing" );
- return nullptr;
- }
-
- CHECK_GL_ERROR();
- return aFbConfigs[i];
-}
-
-#endif
-
OutputDevice::PaintScope::PaintScope(OutputDevice *pDev)
: pHandle( nullptr )
{