Update to m13
[ooovba.git] / applied_patches / 0553-transogl-buildfix-pixmap-ext.diff
blobc21b348d4a4a9a68e68b7056c392c4ed9cb3336a
1 diff -rup slideshow/source/engine/OGLTrans-orig-2/OGLTrans_TransitionerImpl.cxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
2 --- slideshow/source/engine/OGLTrans-orig-2/OGLTrans_TransitionerImpl.cxx 2008-09-01 17:42:13.000000000 +0200
3 +++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx 2008-09-01 18:55:36.000000000 +0200
4 @@ -170,7 +170,7 @@ protected:
6 bool createWindow( Window* pPWindow );
7 void createTexture( unsigned int* texID,
8 -#ifdef GLX_VERSION_1_3
9 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
10 unx::GLXPixmap pixmap,
11 bool usePixmap,
12 #endif
13 @@ -199,7 +199,7 @@ private:
14 unx::Display* dpy;
15 int screen;
16 unx::Window win;
17 -#ifdef GLX_VERSION_1_3
18 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
19 unx::GLXFBConfig fbc;
20 #endif
21 unx::XVisualInfo* vi;
22 @@ -237,7 +237,7 @@ private:
24 uno::Sequence<sal_Int8> LeavingBytes;
26 -#ifdef GLX_VERSION_1_3
27 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
28 unx::GLXPixmap LeavingPixmap;
29 unx::GLXPixmap EnteringPixmap;
30 #endif
31 @@ -352,7 +352,7 @@ bool OGLTransitionerImpl::createWindow(
32 GLWin.screen = XScreenNumberOfScreen( xattr.screen );
34 unx::XVisualInfo* vi( NULL );
35 -#ifdef GLX_VERSION_1_3
36 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
37 unx::XVisualInfo* visinfo;
38 #endif
39 static int attrList3[] =
40 @@ -408,7 +408,7 @@ bool OGLTransitionerImpl::createWindow(
41 delete pWindow;
42 pWindow=NULL;
44 -#ifdef GLX_VERSION_1_3
45 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
46 unx::GLXFBConfig* fbconfigs = NULL;
47 int nfbconfigs, value, i = 0;
48 #endif
49 @@ -420,7 +420,7 @@ bool OGLTransitionerImpl::createWindow(
50 GLWin.screen,
51 *pAttributeTable );
53 -#ifdef GLX_VERSION_1_3
54 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
55 if( vi ) {
56 OSL_TRACE("OGLTrans: using VisualID %08X", vi->visualid);
57 fbconfigs = glXGetFBConfigs (GLWin.dpy, GLWin.screen, &nfbconfigs);
58 @@ -472,7 +472,7 @@ bool OGLTransitionerImpl::createWindow(
59 delete pWindow, pWindow=NULL;
62 -#ifdef GLX_VERSION_1_3
63 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
65 #endif
67 @@ -505,7 +505,7 @@ bool OGLTransitionerImpl::createWindow(
68 #elif defined( UNX )
69 GLWin.dpy = reinterpret_cast<unx::Display*>(pChildSysData->pDisplay);
70 GLWin.win = pChildSysData->aWindow;
71 -#ifdef GLX_VERSION_1_3
72 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
73 GLWin.fbc = fbconfigs[i];
74 #endif
75 GLWin.vi = vi;
76 @@ -677,7 +677,7 @@ void OGLTransitionerImpl::setSlides( con
77 mbUseEnteringPixmap = false;
79 #ifdef UNX
80 -#ifdef GLX_VERSION_1_3
81 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
83 if( mnGLXVersion >= 1.2999 && mbTextureFromPixmap && xLeavingSet.is() && xEnteringSet.is() ) {
84 Sequence< Any > leaveArgs;
85 @@ -779,7 +779,7 @@ void OGLTransitionerImpl::setSlides( con
88 void OGLTransitionerImpl::createTexture( unsigned int* texID,
89 -#ifdef GLX_VERSION_1_3
90 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
91 unx::GLXPixmap pixmap,
92 bool usePixmap,
93 #endif
94 @@ -793,7 +793,7 @@ void OGLTransitionerImpl::createTexture(
95 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
96 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
98 -#ifdef GLX_VERSION_1_3
99 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
100 unx::PFNGLXBINDTEXIMAGEEXTPROC myglXBindTexImageEXT = (unx::PFNGLXBINDTEXIMAGEEXTPROC) unx::glXGetProcAddress( (const GLubyte*) "glXBindTexImageEXT" );
102 if( usePixmap ) {
103 @@ -847,7 +847,7 @@ void OGLTransitionerImpl::createTexture(
104 glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy );
107 -#ifdef GLX_VERSION_1_3
108 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
110 #endif
111 OSL_ENSURE(glIsTexture(*texID), "Can't generate Leaving slide textures in OpenGL");
112 @@ -1013,7 +1013,7 @@ void OGLTransitionerImpl::GLInitSlides()
113 pFormat = chooseFormats();
115 createTexture( &GLleavingSlide,
116 -#ifdef GLX_VERSION_1_3
117 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
118 LeavingPixmap,
119 mbUseLeavingPixmap,
120 #endif
121 @@ -1022,7 +1022,7 @@ void OGLTransitionerImpl::GLInitSlides()
122 pFormat );
124 createTexture( &GLenteringSlide,
125 -#ifdef GLX_VERSION_1_3
126 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
127 EnteringPixmap,
128 mbUseEnteringPixmap,
129 #endif
130 @@ -1104,7 +1104,7 @@ void OGLTransitionerImpl::disposing()
131 glXMakeCurrent( GLWin.dpy, GLWin.win, GLWin.ctx );
132 #endif
134 -#ifdef GLX_VERSION_1_3
135 +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
136 unx::PFNGLXRELEASETEXIMAGEEXTPROC myglXReleaseTexImageEXT = (unx::PFNGLXRELEASETEXIMAGEEXTPROC) unx::glXGetProcAddress( (const GLubyte*) "glXReleaseTexImageEXT" );
137 if( mbUseLeavingPixmap ) {