[ooo-build-commit] patches/dev300
Radek DoulÃk
rodo at kemper.freedesktop.org
Fri Nov 13 03:36:16 PST 2009
patches/dev300/apply | 31 -
patches/dev300/transogl-more-transitions.diff | 708 --------------------------
2 files changed, 7 insertions(+), 732 deletions(-)
New commits:
commit a5c8c963efa76ea189300a4b074921de17cf4a9e
Author: Radek Doulik <rodo at novell.com>
Date: Fri Nov 13 12:34:06 2009 +0100
cleaned transogl patches from apply and fixed UI
* patches/dev300/apply:
cleaned all patches which are upstream
enabled transogl-more-transitions.diff to fix the UI which is broken in upstream
* patches/dev300/transogl-more-transitions.diff:
removed code part, left just xml part and added Newsflash transition here as well
diff --git a/patches/dev300/apply b/patches/dev300/apply
index c357276..55922c0 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2215,39 +2215,10 @@ debian-dictionary.diff, rengelha
[ OpenGLTransitions ]
-# FIXME: 2009-08-21: I think this is upstream, even with slight
-# differences. --tml
-# transogl-transitions-slideshow.diff
-
transogl-transitions-sd.diff
transogl-transitions-officecfg.diff
-# FIXME: 2009-08-27: Parts of this might be upstream, but in a
-# different way. --tml
-# transogl-more-transitions.diff
-# transogl-shader-transitions.diff
-# transogl-mesa-fallback.diff
-# transogl-shader-transitions-1.diff
-# transogl-dispose-fix.diff
-# transogl-sync-fix.diff
-
-[ Fixes ]
-# FIXME: 2009-08-27: As above. --tml
-# transogl-transitions-newsflash-pptin.diff, thorsten
-
-[ OpenGLTransitions ]
-# FIXME: 2009-08-27: As above. --tml
-# transogl-transitions-newsflash.diff, thorsten
-# transogl-detect-fix.diff
-# transogl-buildfix.diff
-# transogl-pixmap-to-texture.diff
-# transogl-fix-dual-head.diff
-# transogl-buildfix-pixmap-ext.diff
-# transogl-fix-presenter-view.diff
-# transogl-debug-time.diff
-# transogl-fix-remote.diff
-# transogl-fix-first-slide.diff
-# slideshow-plugin-transition-fix.diff, n#430449, rodo
+transogl-more-transitions.diff
[ OpenGLTransitionsMesa703 ]
diff --git a/patches/dev300/transogl-more-transitions.diff b/patches/dev300/transogl-more-transitions.diff
index 5f59198..3d3d49b 100644
--- a/patches/dev300/transogl-more-transitions.diff
+++ b/patches/dev300/transogl-more-transitions.diff
@@ -1,6 +1,6 @@
---- sd/xml/transitions-ogl.toglmt~ 2008-01-29 09:34:14.000000000 +0100
-+++ sd/xml/transitions-ogl 2008-07-07 20:28:41.984845429 +0200
-@@ -30,4 +30,16 @@
+--- sd/xml/transitions-ogl.xml 2008-01-29 09:34:14.000000000 +0100
++++ sd/xml/transitions-ogl.xml 2008-07-07 20:28:41.984845429 +0200
+@@ -30,4 +30,19 @@
<anim:par pres:preset-id="rochade">
<anim:transitionFilter smil:type="miscShapeWipe" smil:subtype="bottomRight"/>
</anim:par>
@@ -16,703 +16,7 @@
+ <anim:par pres:preset-id="finedissolve">
+ <anim:transitionFilter smil:type="miscShapeWipe" smil:subtype="bottomCenter"/>
+ </anim:par>
++ <anim:par pres:preset-id="zoom-rotate-in">
++ <anim:transitionFilter smil:type="zoom" smil:subtype="rotateIn"/>
++ </anim:par>
</anim:seq>
---- slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx.toglmt~ 2008-06-24 14:05:08.000000000 +0200
-+++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx 2008-07-07 20:45:35.814847497 +0200
-@@ -160,6 +160,10 @@ private:
- /** Our Transition to be used.
- */
- OGLTransitionImpl* pTransition;
-+
-+ /** whether we are running on ATI fglrx with bug related to textures
-+ */
-+ bool bBrokenTexturesATI;
- };
-
- void OGLTransitionerImpl::initWindowFromSlideShowView( const uno::Reference< presentation::XSlideShowView >& xView, double, double)
-@@ -331,6 +335,8 @@ void OGLTransitionerImpl::initWindowFrom
- wglMakeCurrent(GLWin.hDC,GLWin.hRC);
- #elif defined( UNX )
- glXMakeCurrent( GLWin.dpy, GLWin.win, GLWin.ctx );
-+ /* TODO: check for version once the bug in fglrx driver is fixed */
-+ bBrokenTexturesATI = (strcmp( (const char *) glGetString( GL_VENDOR ), "ATI Technologies Inc." ) == 0 );
- #endif
- glEnable(GL_CULL_FACE);
- glCullFace(GL_BACK);
-@@ -576,6 +582,7 @@ void OGLTransitionerImpl::GLInitSlides()
-
- glGenTextures(1, &GLleavingSlide);
- glBindTexture(GL_TEXTURE_2D, GLleavingSlide);
-+
- if( !pDetectedFormat )
- {
- // force-convert color to ARGB8888 int color space
-@@ -590,18 +597,7 @@ void OGLTransitionerImpl::GLInitSlides()
- GL_RGBA,
- GL_UNSIGNED_BYTE,
- &tempBytes[0]);
-- }
-- else
-- {
-- gluBuild2DMipmaps(GL_TEXTURE_2D,
-- pDetectedFormat->nInternalFormat,
-- SlideSize.Width,
-- SlideSize.Height,
-- pDetectedFormat->eFormat,
-- pDetectedFormat->eType,
-- &LeavingBytes[0]);
-- }
-- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);//TRILINEAR FILTERING
-@@ -609,6 +605,34 @@ void OGLTransitionerImpl::GLInitSlides()
- glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy);//anistropic filtering (to make texturing not suck when looking at polygons from oblique angles)
-
-+ }
-+ else
-+ {
-+ if( pTransition && !bBrokenTexturesATI && !pTransition->mbUseMipMapLeaving) {
-+ glTexImage2D(GL_TEXTURE_2D, 0, pDetectedFormat->nInternalFormat, SlideSize.Width,
-+ SlideSize.Height, &LeavingBytes[0]);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
-+ } else {
-+ gluBuild2DMipmaps(GL_TEXTURE_2D,
-+ pDetectedFormat->nInternalFormat,
-+ SlideSize.Width,
-+ SlideSize.Height,
-+ pDetectedFormat->eFormat,
-+ pDetectedFormat->eType,
-+ &LeavingBytes[0]);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);//TRILINEAR FILTERING
-+ //anistropic filtering (to make texturing not suck when looking at polygons from oblique angles)
-+ GLfloat largest_supported_anisotropy;
-+ glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy);
-+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy);
-+ }
-+ }
- OSL_ENSURE(glIsTexture(GLleavingSlide), "Can't generate Leaving slide textures in OpenGL");
-
- glDeleteTextures(1,&GLenteringSlide);
-@@ -629,23 +653,42 @@ void OGLTransitionerImpl::GLInitSlides()
- GL_RGBA,
- GL_UNSIGNED_BYTE,
- &tempBytes[0]);
-- }
-- else
-- {
-- gluBuild2DMipmaps(GL_TEXTURE_2D,
-- pDetectedFormat->nInternalFormat,
-- SlideSize.Width,
-- SlideSize.Height,
-- pDetectedFormat->eFormat,
-- pDetectedFormat->eType,
-- &EnteringBytes[0]);
-- }
-- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);//TRILINEAR FILTERING
-+ GLfloat largest_supported_anisotropy;
-+ glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy);//anistropic filtering (to make texturing not suck when looking at polygons from oblique angles)
-
-+ }
-+ else
-+ {
-+ if( pTransition && !bBrokenTexturesATI && !pTransition->mbUseMipMapEntering ) {
-+ glTexImage2D(GL_TEXTURE_2D, 0, pDetectedFormat->nInternalFormat, SlideSize.Width, SlideSize.Height, 0, Format, GL_UNSIGNED_BYTE, &EnteringBytes[0]);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
-+ } else {
-+ gluBuild2DMipmaps(GL_TEXTURE_2D,
-+ pDetectedFormat->nInternalFormat,
-+ SlideSize.Width,
-+ SlideSize.Height,
-+ pDetectedFormat->eFormat,
-+ pDetectedFormat->eType,
-+ &EnteringBytes[0]);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
-+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);//TRILINEAR FILTERING
-+ //anistropic filtering (to make texturing not suck when looking at polygons from oblique angles)
-+ GLfloat largest_supported_anisotropy;
-+ glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy);
-+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy);
-+
-+ }
-+ }
- OSL_ENSURE( glIsTexture(GLenteringSlide), "Can't generate entering slide textures in OpenGL" );
- }
-
-@@ -737,26 +780,32 @@ public:
- // XTransitionFactory
- virtual ::sal_Bool SAL_CALL hasTransition( ::sal_Int16 transitionType, ::sal_Int16 transitionSubType ) throw (uno::RuntimeException)
- {
-- if( transitionType != animations::TransitionType::MISCSHAPEWIPE )
-+ if( transitionType == animations::TransitionType::MISCSHAPEWIPE ) {
-+ switch( transitionSubType )
-+ {
-+ case animations::TransitionSubType::ACROSS:
-+ case animations::TransitionSubType::CORNERSOUT:
-+ case animations::TransitionSubType::CIRCLE:
-+ case animations::TransitionSubType::FANOUTHORIZONTAL:
-+ case animations::TransitionSubType::CORNERSIN:
-+ case animations::TransitionSubType::LEFTTORIGHT:
-+ case animations::TransitionSubType::TOPTOBOTTOM:
-+ case animations::TransitionSubType::TOPRIGHT:
-+ case animations::TransitionSubType::TOPLEFT:
-+ case animations::TransitionSubType::BOTTOMRIGHT:
-+ case animations::TransitionSubType::BOTTOMLEFT:
-+ case animations::TransitionSubType::TOPCENTER:
-+ return sal_True;
-+
-+ default:
-+ return sal_False;
-+ }
-+ } else if( transitionType == animations::TransitionType::FADE && transitionSubType == animations::TransitionSubType::CROSSFADE ) {
-+ return sal_True;
-+ } else if( transitionType == animations::TransitionType::IRISWIPE && transitionSubType == animations::TransitionSubType::DIAMOND ) {
-+ return sal_True;
-+ } else
- return sal_False;
--
-- switch( transitionSubType )
-- {
-- case animations::TransitionSubType::ACROSS:
-- case animations::TransitionSubType::CORNERSOUT:
-- case animations::TransitionSubType::CIRCLE:
-- case animations::TransitionSubType::FANOUTHORIZONTAL:
-- case animations::TransitionSubType::CORNERSIN:
-- case animations::TransitionSubType::LEFTTORIGHT:
-- case animations::TransitionSubType::TOPTOBOTTOM:
-- case animations::TransitionSubType::TOPRIGHT:
-- case animations::TransitionSubType::TOPLEFT:
-- case animations::TransitionSubType::BOTTOMRIGHT:
-- return sal_True;
--
-- default:
-- return sal_False;
-- }
- }
-
- virtual uno::Reference< presentation::XTransition > SAL_CALL createTransition(
-@@ -767,44 +816,59 @@ public:
- const uno::Reference< rendering::XBitmap >& enteringBitmap,
- const geometry::RealPoint2D& slideOffset ) throw (uno::RuntimeException)
- {
-- if( transitionType != animations::TransitionType::MISCSHAPEWIPE )
-- return uno::Reference< presentation::XTransition >();
-+ OGLTransitionImpl* pTransition;
-
-- OGLTransitionImpl* pTransition = new OGLTransitionImpl();
-- switch( transitionSubType )
-- {
-- case animations::TransitionSubType::ACROSS:
-- pTransition->makeNByMTileFlip(8,6);
-- break;
-- case animations::TransitionSubType::CORNERSOUT:
-- pTransition->makeOutsideCubeFaceToLeft();
-- break;
-- case animations::TransitionSubType::CIRCLE:
-- pTransition->makeRevolvingCircles(8,128);
-- break;
-- case animations::TransitionSubType::FANOUTHORIZONTAL:
-- pTransition->makeHelix(20);
-- break;
-- case animations::TransitionSubType::CORNERSIN:
-- pTransition->makeInsideCubeFaceToLeft();
-- break;
-- case animations::TransitionSubType::LEFTTORIGHT:
-- pTransition->makeFallLeaving();
-- break;
-- case animations::TransitionSubType::TOPTOBOTTOM:
-- pTransition->makeTurnAround();
-- break;
-- case animations::TransitionSubType::TOPRIGHT:
-- pTransition->makeTurnDown();
-- break;
-- case animations::TransitionSubType::TOPLEFT:
-- pTransition->makeIris();
-- break;
-- case animations::TransitionSubType::BOTTOMRIGHT:
-- pTransition->makeRochade();
-- break;
-- default:
-- return uno::Reference< presentation::XTransition >();
-+ if( transitionType == animations::TransitionType::MISCSHAPEWIPE ) {
-+ pTransition = new OGLTransitionImpl();
-+ switch( transitionSubType )
-+ {
-+ case animations::TransitionSubType::ACROSS:
-+ pTransition->makeNByMTileFlip(8,6);
-+ break;
-+ case animations::TransitionSubType::CORNERSOUT:
-+ pTransition->makeOutsideCubeFaceToLeft();
-+ break;
-+ case animations::TransitionSubType::CIRCLE:
-+ pTransition->makeRevolvingCircles(8,128);
-+ break;
-+ case animations::TransitionSubType::FANOUTHORIZONTAL:
-+ pTransition->makeHelix(20);
-+ break;
-+ case animations::TransitionSubType::CORNERSIN:
-+ pTransition->makeInsideCubeFaceToLeft();
-+ break;
-+ case animations::TransitionSubType::LEFTTORIGHT:
-+ pTransition->makeFallLeaving();
-+ break;
-+ case animations::TransitionSubType::TOPTOBOTTOM:
-+ pTransition->makeTurnAround();
-+ break;
-+ case animations::TransitionSubType::TOPRIGHT:
-+ pTransition->makeTurnDown();
-+ break;
-+ case animations::TransitionSubType::TOPLEFT:
-+ pTransition->makeIris();
-+ break;
-+ case animations::TransitionSubType::BOTTOMRIGHT:
-+ pTransition->makeRochade();
-+ break;
-+ case animations::TransitionSubType::BOTTOMLEFT:
-+ pTransition->makeVenetianBlinds( true, 8 );
-+ break;
-+ case animations::TransitionSubType::TOPCENTER:
-+ pTransition->makeVenetianBlinds( false, 6 );
-+ break;
-+ default:
-+ return uno::Reference< presentation::XTransition >();
-+ }
-+ } else if( transitionType == animations::TransitionType::FADE && transitionSubType == animations::TransitionSubType::CROSSFADE ) {
-+ pTransition = new OGLTransitionImpl();
-+ pTransition->makeFadeSmoothly();
-+ } else if( transitionType == animations::TransitionType::IRISWIPE && transitionSubType == animations::TransitionSubType::DIAMOND ) {
-+ pTransition = new OGLTransitionImpl();
-+ pTransition->makeDiamond();
-+ } else {
-+ return uno::Reference< presentation::XTransition >();
- }
-
- rtl::Reference<OGLTransitionerImpl> xRes(
---- slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx.toglmt~ 2008-07-07 20:27:31.875846382 +0200
-+++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx 2008-07-07 20:28:41.980845898 +0200
-@@ -30,6 +30,7 @@
- #include "OGLTrans_TransitionImpl.hxx"
-
- #include <GL/gl.h>
-+#include <math.h>
-
-
- void OGLTransitionImpl::clear()
-@@ -43,7 +44,7 @@ void OGLTransitionImpl::clear()
- delete maSceneObjects[i];
- maSceneObjects.clear();
-
-- bReflectSlides = false;
-+ mbReflectSlides = false;
- }
-
- OGLTransitionImpl::~OGLTransitionImpl()
-@@ -70,23 +71,25 @@ static void blendSlide( double depth )
- double showHeight = -1 + depth*2;
- GLfloat reflectionColor[] = {0, 0, 0, 0.25};
-
-+ glDisable( GL_DEPTH_TEST );
- glBegin( GL_QUADS );
- glColor4fv( reflectionColor );
-- glVertex3f( -1.01, -1.01, 0.001 );
-+ glVertex3f( -1, -1, 0 );
- glColor4f( 0, 0, 0, 1 );
-- glVertex3f(-1.01, showHeight, 0.001 );
-- glVertex3f( 1.01, showHeight, 0.001 );
-+ glVertex3f(-1, showHeight, 0 );
-+ glVertex3f( 1, showHeight, 0 );
- glColor4fv( reflectionColor );
-- glVertex3f( 1.01, -1.01, 0.001 );
-+ glVertex3f( 1, -1, 0 );
- glEnd();
-
- glBegin( GL_QUADS );
- glColor4f( 0, 0, 0, 1 );
-- glVertex3f( -1.01, showHeight, 0.001 );
-- glVertex3f( -1.01, 1.01, 0.001 );
-- glVertex3f( 1.01, 1.01, 0.001 );
-- glVertex3f( 1.01, showHeight, 0.001 );
-+ glVertex3f( -1, showHeight, 0 );
-+ glVertex3f( -1, 1, 0 );
-+ glVertex3f( 1, 1, 0 );
-+ glVertex3f( 1, showHeight, 0 );
- glEnd();
-+ glEnable( GL_DEPTH_TEST );
- }
-
- void OGLTransitionImpl::display( double nTime, ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex,
-@@ -97,8 +100,13 @@ void OGLTransitionImpl::display( double
- SlideWidthScale = SlideWidth/DispWidth;
- SlideHeightScale = SlideHeight/DispHeight;
-
-+ if( mmPrepare ) {
-+ clear();
-+ (this->*mmPrepare)( nTime, SlideWidth, SlideHeight, DispWidth, DispHeight );
-+ }
-+
- glPushMatrix();
-- if ( bReflectSlides ) {
-+ if ( mbReflectSlides ) {
- double reflectionDepth = 0.3;
- double surfaceLevel = -0.04;
-
-@@ -145,18 +153,28 @@ void OGLTransitionImpl::applyOverallOper
- OverallOperations[i]->interpolate(nTime,SlideWidthScale,SlideHeightScale);
- }
-
-+void OGLTransitionImpl::displaySlide( double nTime, ::sal_Int32 glSlideTex, std::vector<Primitive>& primitives,
-+ double SlideWidthScale, double SlideHeightScale )
-+{
-+ //TODO change to foreach
-+ glBindTexture(GL_TEXTURE_2D, glSlideTex);
-+
-+ for(unsigned int i(0); i < primitives.size(); ++i)
-+ primitives[i].display(nTime, SlideWidthScale, SlideHeightScale);
-+}
-+
- void OGLTransitionImpl::displaySlides( double nTime, ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex,
- double SlideWidthScale, double SlideHeightScale )
- {
-- applyOverallOperations( nTime, SlideWidthScale, SlideHeightScale );
-- glEnable(GL_TEXTURE_2D);
-- //TODO change to foreach
-- glBindTexture(GL_TEXTURE_2D, glLeavingSlideTex);
-- for(unsigned int i(0); i < maLeavingSlidePrimitives.size(); ++i)
-- maLeavingSlidePrimitives[i].display(nTime,SlideWidthScale,SlideHeightScale);
-- glBindTexture(GL_TEXTURE_2D, glEnteringSlideTex);
-- for(unsigned int i(0); i < maEnteringSlidePrimitives.size(); ++i)
-- maEnteringSlidePrimitives[i].display(nTime,SlideWidthScale,SlideHeightScale);
-+ if( mmDisplaySlides )
-+ (this->*mmDisplaySlides)( nTime, glLeavingSlideTex, glEnteringSlideTex, SlideWidthScale, SlideHeightScale );
-+ else {
-+ applyOverallOperations( nTime, SlideWidthScale, SlideHeightScale );
-+
-+ glEnable(GL_TEXTURE_2D);
-+ displaySlide( nTime, glLeavingSlideTex, maLeavingSlidePrimitives, SlideWidthScale, SlideHeightScale );
-+ displaySlide( nTime, glEnteringSlideTex, maEnteringSlidePrimitives, SlideWidthScale, SlideHeightScale );
-+ }
- }
-
- void OGLTransitionImpl::displayScene( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight )
-@@ -298,6 +316,8 @@ void OGLTransitionImpl::makeFallLeaving(
-
- Slide.Operations.push_back(new RotateAndScaleDepthByWidth(basegfx::B3DVector(1,0,0),basegfx::B3DVector(0,-1,0), 90,true,0.0,1.0));
- maLeavingSlidePrimitives.push_back(Slide);
-+
-+ mbUseMipMapEntering = false;
- }
-
- void OGLTransitionImpl::makeTurnAround()
-@@ -305,7 +325,7 @@ void OGLTransitionImpl::makeTurnAround()
- clear();
- Primitive Slide;
-
-- bReflectSlides = true;
-+ mbReflectSlides = true;
-
- Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
- Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
-@@ -332,6 +352,8 @@ void OGLTransitionImpl::makeTurnDown()
- Slide.Operations.push_back(new SRotate (basegfx::B3DVector(0, 0, 1), basegfx::B3DVector(-1, 1, 0), -90, true, 0.0, 1.0));
- Slide.Operations.push_back(new SRotate (basegfx::B3DVector(0, 0, 1), basegfx::B3DVector(-1, 1, 0), 90, false, -1.0, 0.0));
- maEnteringSlidePrimitives.push_back(Slide);
-+
-+ mbUseMipMapLeaving = false;
- }
-
- void OGLTransitionImpl::makeIris()
-@@ -343,8 +365,8 @@ void OGLTransitionImpl::makeIris()
- Slide.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
- maEnteringSlidePrimitives.push_back (Slide);
-
-- Slide.Operations.push_back (new STranslate (basegfx::B3DVector (0, 0, 0.0001), false, -1, 0));
-- Slide.Operations.push_back (new STranslate (basegfx::B3DVector (0, 0, -0.0002), false, 0.5, 1));
-+ Slide.Operations.push_back (new STranslate (basegfx::B3DVector (0, 0, 0.000001), false, -1, 0));
-+ Slide.Operations.push_back (new STranslate (basegfx::B3DVector (0, 0, -0.000002), false, 0.5, 1));
- maLeavingSlidePrimitives.push_back (Slide);
-
-
-@@ -397,6 +419,8 @@ void OGLTransitionImpl::makeIris()
- }
-
- maSceneObjects.push_back (pIris);
-+
-+ mbUseMipMapLeaving = mbUseMipMapEntering = false;
- }
-
- void OGLTransitionImpl::makeRochade()
-@@ -404,7 +428,7 @@ void OGLTransitionImpl::makeRochade()
- clear();
- Primitive Slide;
-
-- bReflectSlides = true;
-+ mbReflectSlides = true;
-
- double w, h;
-
-@@ -653,6 +677,13 @@ RotateAndScaleDepthByWidth::RotateAndSca
- bInterpolate = bInter;
- }
-
-+RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle, bool bInter, double T0, double T1):axis(Axis),origin(Origin),angle(Angle)
-+{
-+ nT0 = T0;
-+ nT1 = T1;
-+ bInterpolate = bInter;
-+}
-+
-
- STranslate::STranslate(const basegfx::B3DVector& Vector, bool bInter, double T0, double T1):vector(Vector)
- {
-@@ -712,6 +743,18 @@ void RotateAndScaleDepthByWidth::interpo
- glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-SlideWidthScale*origin.getZ());
- }
-
-+void RotateAndScaleDepthByHeight::interpolate(double t,double SlideWidthScale,double SlideHeightScale)
-+{
-+ if(t <= nT0)
-+ return;
-+ if(!bInterpolate || t > nT1)
-+ t = nT1;
-+ t = intervalInter(t,nT0,nT1);
-+ glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),SlideHeightScale*origin.getZ());
-+ glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ());
-+ glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-SlideHeightScale*origin.getZ());
-+}
-+
- SEllipseTranslate::SEllipseTranslate(double dWidth, double dHeight, double dStartPosition, double dEndPosition, bool bInter, double T0, double T1)
- {
- nT0 = T0;
-@@ -764,6 +807,11 @@ RotateAndScaleDepthByWidth* RotateAndSca
- return new RotateAndScaleDepthByWidth(*this);
- }
-
-+RotateAndScaleDepthByHeight* RotateAndScaleDepthByHeight::clone()
-+{
-+ return new RotateAndScaleDepthByHeight(*this);
-+}
-+
- const Primitive& Primitive::operator=(const Primitive& rvalue)
- {
- for(unsigned int i( 0 ); i < rvalue.Operations.size(); ++i)
-@@ -831,3 +879,108 @@ void Primitive::pushTriangle(const baseg
- Normals.push_back(basegfx::B3DVector(0,0,1));//all normals always face the screen when untransformed.
- Normals.push_back(basegfx::B3DVector(0,0,1));//all normals always face the screen when untransformed.
- }
-+
-+void OGLTransitionImpl::makeDiamond()
-+{
-+ mmPrepare = &OGLTransitionImpl::prepareDiamond;
-+ mbUseMipMapLeaving = mbUseMipMapEntering = false;
-+}
-+
-+void OGLTransitionImpl::prepareDiamond( double nTime, double /* SlideWidth */, double /* SlideHeight */, double /* DispWidth */, double /* DispHeight */ )
-+{
-+ Primitive Slide1, Slide2;
-+
-+ Slide1.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
-+ Slide1.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
-+ maEnteringSlidePrimitives.push_back (Slide1);
-+
-+
-+ if( nTime >= 0.5 ) {
-+ double m = 1 - nTime;
-+
-+ Slide2.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (m,0), basegfx::B2DVector (0,m));
-+ Slide2.pushTriangle (basegfx::B2DVector (nTime,0), basegfx::B2DVector (1,0), basegfx::B2DVector (1,m));
-+ Slide2.pushTriangle (basegfx::B2DVector (1,nTime), basegfx::B2DVector (1,1), basegfx::B2DVector (nTime,1));
-+ Slide2.pushTriangle (basegfx::B2DVector (0,nTime), basegfx::B2DVector (m,1), basegfx::B2DVector (0,1));
-+ } else {
-+ double l = 0.5 - nTime;
-+ double h = 0.5 + nTime;
-+
-+ Slide2.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0.5,l));
-+ Slide2.pushTriangle (basegfx::B2DVector (0.5,l), basegfx::B2DVector (1,0), basegfx::B2DVector (h,0.5));
-+ Slide2.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (1,1), basegfx::B2DVector (h,0.5));
-+ Slide2.pushTriangle (basegfx::B2DVector (h,0.5), basegfx::B2DVector (1,1), basegfx::B2DVector (0.5,h));
-+ Slide2.pushTriangle (basegfx::B2DVector (0.5,h), basegfx::B2DVector (1,1), basegfx::B2DVector (0,1));
-+ Slide2.pushTriangle (basegfx::B2DVector (l,0.5), basegfx::B2DVector (0.5,h), basegfx::B2DVector (0,1));
-+ Slide2.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (l,0.5), basegfx::B2DVector (0,1));
-+ Slide2.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (0.5,l), basegfx::B2DVector (l,0.5));
-+ }
-+ Slide2.Operations.push_back (new STranslate (basegfx::B3DVector (0, 0, 0.00000001), false, -1, 0));
-+ maLeavingSlidePrimitives.push_back (Slide2);
-+}
-+
-+void OGLTransitionImpl::makeVenetianBlinds( bool vertical, int parts )
-+{
-+ static double t30 = tan( M_PI/6.0 );
-+ double n, ln = 0;
-+ double p = 1.0/parts;
-+
-+ for( int i=0; i<parts; i++ ) {
-+ Primitive Slide;
-+ n = (i + 1)/(double)parts;
-+ if( vertical ) {
-+ Slide.pushTriangle (basegfx::B2DVector (ln,0), basegfx::B2DVector (n,0), basegfx::B2DVector (ln,1));
-+ Slide.pushTriangle (basegfx::B2DVector (n,0), basegfx::B2DVector (ln,1), basegfx::B2DVector (n,1));
-+ Slide.Operations.push_back(new RotateAndScaleDepthByWidth(basegfx::B3DVector(0, 1, 0), basegfx::B3DVector(n + ln - 1, 0, -t30*p), -120, true, 0.0, 1.0));
-+ } else {
-+ Slide.pushTriangle (basegfx::B2DVector (0,ln), basegfx::B2DVector (1,ln), basegfx::B2DVector (0,n));
-+ Slide.pushTriangle (basegfx::B2DVector (1,ln), basegfx::B2DVector (0,n), basegfx::B2DVector (1,n));
-+ Slide.Operations.push_back(new RotateAndScaleDepthByHeight(basegfx::B3DVector(1, 0, 0), basegfx::B3DVector(0, 1 - n - ln, -t30*p), -120, true, 0.0, 1.0));
-+ }
-+ maLeavingSlidePrimitives.push_back (Slide);
-+
-+ if( vertical ) {
-+ Slide.Operations.push_back(new SRotate(basegfx::B3DVector(0, 1, 0), basegfx::B3DVector(2*n - 1, 0, 0), -60, false, -1, 0));
-+ Slide.Operations.push_back(new SRotate(basegfx::B3DVector(0, 1, 0), basegfx::B3DVector(n + ln - 1, 0, 0), 180, false, -1, 0));
-+ } else {
-+ Slide.Operations.push_back(new SRotate(basegfx::B3DVector(1, 0, 0), basegfx::B3DVector(0, 1 - 2*n, 0), -60, false, -1, 0));
-+ Slide.Operations.push_back(new SRotate(basegfx::B3DVector(1, 0, 0), basegfx::B3DVector(0, 1 - n - ln, 0), 180, false, -1, 0));
-+ }
-+ maEnteringSlidePrimitives.push_back (Slide);
-+ ln = n;
-+ }
-+}
-+
-+void OGLTransitionImpl::displaySlidesFadeSmoothly( double nTime, ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex, double SlideWidthScale, double SlideHeightScale )
-+{
-+ applyOverallOperations( nTime, SlideWidthScale, SlideHeightScale );
-+
-+ glDisable(GL_DEPTH_TEST);
-+
-+ displaySlide( nTime, glLeavingSlideTex, maLeavingSlidePrimitives, SlideWidthScale, SlideHeightScale );
-+
-+ glDisable(GL_LIGHTING);
-+ glEnable(GL_BLEND);
-+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-+ glColor4f( 1, 1, 1, nTime );
-+ displaySlide( nTime, glEnteringSlideTex, maEnteringSlidePrimitives, SlideWidthScale, SlideHeightScale );
-+ glDisable(GL_BLEND);
-+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-+ glEnable(GL_LIGHTING);
-+
-+ glEnable(GL_DEPTH_TEST);
-+}
-+
-+void OGLTransitionImpl::makeFadeSmoothly()
-+{
-+ Primitive Slide;
-+
-+ Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
-+ Slide.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
-+ maLeavingSlidePrimitives.push_back (Slide);
-+ maEnteringSlidePrimitives.push_back (Slide);
-+
-+ mmDisplaySlides = &OGLTransitionImpl::displaySlidesFadeSmoothly;
-+ mbUseMipMapLeaving = mbUseMipMapEntering = false;
-+}
---- slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx.toglmt~ 2008-07-07 20:27:31.876846509 +0200
-+++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx 2008-07-07 20:31:23.258846593 +0200
-@@ -62,9 +62,14 @@ class OGLTransitionImpl
- {
- public:
- OGLTransitionImpl() :
-+ mbUseMipMapLeaving( true ),
-+ mbUseMipMapEntering( true ),
- maLeavingSlidePrimitives(),
- maEnteringSlidePrimitives(),
-- maSceneObjects()
-+ maSceneObjects(),
-+ mbReflectSlides( false ),
-+ mmPrepare( NULL ),
-+ mmDisplaySlides( NULL )
- {}
-
- ~OGLTransitionImpl();
-@@ -83,6 +88,17 @@ public:
- void makeTurnDown();
- void makeIris();
- void makeRochade();
-+ void makeVenetianBlinds( bool vertical, int parts );
-+
-+ /** 2D replacements
-+ */
-+ void makeDiamond();
-+ void makeFadeSmoothly();
-+
-+ /** Whether to use mipmaping for slides textures
-+ */
-+ bool mbUseMipMapLeaving;
-+ bool mbUseMipMapEntering;
-
- private:
- /** clears all the primitives and operations
-@@ -108,11 +124,34 @@ private:
- /** Whether to reflect slides, the reflection happens on flat surface beneath the slides.
- ** Now it only works with slides which keep their rectangular shape together.
- */
-- bool bReflectSlides;
-+ bool mbReflectSlides;
-+
-+ /** GLSL objects, shaders and program
-+ */
-+ GLuint mVertexObject, mFragmentObject, mProgramObject;
-+
-+ /** various data */
-+ GLuint maHelperTexture;
-+
-+ /** When this method is not NULL, it is called in display method to prepare the slides, scene, etc.
-+ ** We might later replace this by cleaner derived class.
-+ */
-+ void (OGLTransitionImpl::*mmPrepare)( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight );
-+
-+ /** When this method is not NULL, it is called in display method to display the slides.
-+ ** We might later replace this by cleaner derived class.
-+ */
-+ void (OGLTransitionImpl::*mmDisplaySlides)( double nTime, ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex, double SlideWidthScale, double SlideHeightScale );
-
- void displaySlides( double nTime, ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex, double SlideWidthScale, double SlideHeightScale );
-+ void displaySlide( double nTime, ::sal_Int32 glSlideTex, std::vector<Primitive>& primitives, double SlideWidthScale, double SlideHeightScale );
- void displayScene( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight);
- void applyOverallOperations( double nTime, double SlideWidthScale, double SlideHeightScale );
-+
-+ /** various transitions helper methods
-+ */
-+ void prepareDiamond( double nTime, double SlideWidth, double SlideHeight,double DispWidth, double DispHeight );
-+ void displaySlidesFadeSmoothly( double nTime, ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex, double SlideWidthScale, double SlideHeightScale );
- };
-
- class SceneObject
-@@ -419,5 +451,21 @@ private:
- double angle;
- };
-
-+/** Same as SRotate, except the depth is scaled by the width of the slide divided by the height of the window.
-+*/
-+class RotateAndScaleDepthByHeight: public Operation
-+{
-+public:
-+ void interpolate(double t,double SlideWidthScale,double SlideHeightScale);
-+ RotateAndScaleDepthByHeight* clone();
-+
-+ RotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1);
-+ ~RotateAndScaleDepthByHeight(){}
-+private:
-+ basegfx::B3DVector axis;
-+ basegfx::B3DVector origin;
-+ double angle;
-+};
-+
- #endif // INCLUDED_SLIDESHOW_TRANSITION_HXX_
-
More information about the ooo-build-commit
mailing list