Kaydet (Commit) 492c23af authored tarafından Thorsten Behrens's avatar Thorsten Behrens Kaydeden (comit) Thorsten Behrens

Fix opengl transitions some more.

More fixup after a775188f -
shuffling use of framebuffer config array to a place where it's not
yet free-ed again.

Change-Id: Icc50d08e2d42e6fbdb46de668a98d31e364f0bdc
üst 81d657f3
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
// Includes <GL/gl.h> // Includes <GL/gl.h>
#include "OGLTrans_TransitionImpl.hxx" #include "OGLTrans_TransitionImpl.hxx"
#include <string.h>
#include <sal/types.h> #include <sal/types.h>
#include <com/sun/star/beans/XFastPropertySet.hpp> #include <com/sun/star/beans/XFastPropertySet.hpp>
...@@ -518,7 +519,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow ) ...@@ -518,7 +519,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap ) #if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
unx::GLXFBConfig* fbconfigs = NULL; unx::GLXFBConfig* fbconfigs = NULL;
int nfbconfigs, value, i = 0; int nfbconfigs = 0, value = 0, i = 0;
#endif #endif
while( *pAttributeTable ) while( *pAttributeTable )
...@@ -576,6 +577,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow ) ...@@ -576,6 +577,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
if( i != nfbconfigs ) { if( i != nfbconfigs ) {
vi = glXGetVisualFromFBConfig( GLWin.dpy, fbconfigs[i] ); vi = glXGetVisualFromFBConfig( GLWin.dpy, fbconfigs[i] );
GLWin.fbc = fbconfigs[i];
mbHasTFPVisual = true; mbHasTFPVisual = true;
pChildSysData = lcl_createSystemWindow( vi, pPWindow, &pWindow ); pChildSysData = lcl_createSystemWindow( vi, pPWindow, &pWindow );
SAL_INFO("slideshow.opengl", "found visual suitable for texture_from_pixmap"); SAL_INFO("slideshow.opengl", "found visual suitable for texture_from_pixmap");
...@@ -624,10 +626,6 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow ) ...@@ -624,10 +626,6 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
#elif defined( UNX ) #elif defined( UNX )
GLWin.dpy = reinterpret_cast<unx::Display*>(pChildSysData->pDisplay); GLWin.dpy = reinterpret_cast<unx::Display*>(pChildSysData->pDisplay);
GLWin.win = pChildSysData->aWindow; GLWin.win = pChildSysData->aWindow;
#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
if( mbHasTFPVisual )
GLWin.fbc = fbconfigs[i];
#endif
GLWin.vi = vi; GLWin.vi = vi;
GLWin.GLXExtensions = unx::glXQueryExtensionsString( GLWin.dpy, GLWin.screen ); GLWin.GLXExtensions = unx::glXQueryExtensionsString( GLWin.dpy, GLWin.screen );
SAL_INFO("slideshow.opengl", "available GLX extensions: " << GLWin.GLXExtensions); SAL_INFO("slideshow.opengl", "available GLX extensions: " << GLWin.GLXExtensions);
...@@ -1762,7 +1760,6 @@ void OGLTransitionerImpl::disposing() ...@@ -1762,7 +1760,6 @@ void OGLTransitionerImpl::disposing()
OGLTransitionerImpl::OGLTransitionerImpl() : OGLTransitionerImpl::OGLTransitionerImpl() :
OGLTransitionerImplBase(m_aMutex), OGLTransitionerImplBase(m_aMutex),
GLWin(),
GLleavingSlide( 0 ), GLleavingSlide( 0 ),
GLenteringSlide( 0 ), GLenteringSlide( 0 ),
pWindow( NULL ), pWindow( NULL ),
...@@ -1775,15 +1772,7 @@ OGLTransitionerImpl::OGLTransitionerImpl() : ...@@ -1775,15 +1772,7 @@ OGLTransitionerImpl::OGLTransitionerImpl() :
SlideBitmapLayout(), SlideBitmapLayout(),
SlideSize() SlideSize()
{ {
#if defined( _WIN32 ) memset(&GLWin, 0, sizeof(GLWin));
GLWin.hWnd = 0;
#elif defined( UNX )
GLWin.ctx = 0;
#endif
#if OSL_DEBUG_LEVEL > 1
mnFrameCount = 0;
#endif
} }
typedef cppu::WeakComponentImplHelper1<presentation::XTransitionFactory> OGLTransitionFactoryImplBase; typedef cppu::WeakComponentImplHelper1<presentation::XTransitionFactory> OGLTransitionFactoryImplBase;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment