ooo-build r11856 - in trunk: . patches/src680



Author: rodo
Date: Mon Mar 10 15:53:16 2008
New Revision: 11856
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11856&view=rev

Log:
2008-03-10  Radek Doulik  <rodo novell com>

	*
	build/ooh680-m9/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx:
	check for gl headers version >= 2.0 at the build time for shader
	code parts



Modified:
   trunk/ChangeLog
   trunk/patches/src680/transogl-shader-transitions.diff

Modified: trunk/patches/src680/transogl-shader-transitions.diff
==============================================================================
--- trunk/patches/src680/transogl-shader-transitions.diff	(original)
+++ trunk/patches/src680/transogl-shader-transitions.diff	Mon Mar 10 15:53:16 2008
@@ -1,6 +1,6 @@
-diff -rup ../ooh680-m8/slideshow/source/engine/OGLTrans/makefile.mk slideshow/source/engine/OGLTrans/makefile.mk
---- ../ooh680-m8/slideshow/source/engine/OGLTrans/makefile.mk	2008-03-06 20:57:10.000000000 +0100
-+++ slideshow/source/engine/OGLTrans/makefile.mk	2008-03-05 15:07:56.000000000 +0100
+diff -rup slideshow/source/engine/OGLTrans-orig/makefile.mk slideshow/source/engine/OGLTrans/makefile.mk
+--- slideshow/source/engine/OGLTrans-orig/makefile.mk	2008-03-10 16:48:29.000000000 +0100
++++ slideshow/source/engine/OGLTrans/makefile.mk	2008-03-10 15:15:33.000000000 +0100
 @@ -56,7 +56,7 @@ ENABLE_EXCEPTIONS=TRUE
  SLOFILES = \
          $(SLO)$/OGLTrans_TransitionImpl.obj \
@@ -10,9 +10,9 @@
  DLLPRE=
  SHL1TARGET=$(TARGET).uno
  
-diff -rup ../ooh680-m8/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
---- ../ooh680-m8/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx	2008-03-06 20:57:35.000000000 +0100
-+++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx	2008-03-06 12:57:01.000000000 +0100
+diff -rup slideshow/source/engine/OGLTrans-orig/OGLTrans_TransitionerImpl.cxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
+--- slideshow/source/engine/OGLTrans-orig/OGLTrans_TransitionerImpl.cxx	2008-03-10 16:48:29.000000000 +0100
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx	2008-03-10 15:15:33.000000000 +0100
 @@ -86,7 +86,7 @@ class OGLTransitionerImpl : private cppu
  {
  public:
@@ -192,11 +192,9 @@
          xRes->setSlides(leavingBitmap,enteringBitmap);
  
          return uno::Reference<presentation::XTransition>(xRes.get());
-Only in slideshow/source/engine/OGLTrans: OGLTrans_TransitionerImpl.cxx.orig
-Only in slideshow/source/engine/OGLTrans: OGLTrans_TransitionerImpl.cxx.rej
-diff -rup ../ooh680-m8/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx
---- ../ooh680-m8/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx	2008-03-06 20:57:35.000000000 +0100
-+++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx	2008-03-06 11:50:51.000000000 +0100
+diff -rup slideshow/source/engine/OGLTrans-orig/OGLTrans_TransitionImpl.cxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx
+--- slideshow/source/engine/OGLTrans-orig/OGLTrans_TransitionImpl.cxx	2008-03-10 16:48:29.000000000 +0100
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx	2008-03-10 16:43:23.000000000 +0100
 @@ -32,8 +32,10 @@
   *    MA  02111-1307  USA
   *
@@ -208,11 +206,12 @@
  #include <math.h>
  
  void OGLTransitionImpl::clear()
-@@ -48,6 +50,29 @@ void OGLTransitionImpl::clear()
+@@ -48,6 +50,31 @@ void OGLTransitionImpl::clear()
      maSceneObjects.clear();
  
      mbReflectSlides = false;
 +
++#ifdef GL_VERSION_2_0
 +    if( mProgramObject ) {
 +        glDeleteProgram( mProgramObject );
 +        mProgramObject = 0;
@@ -227,6 +226,7 @@
 +        glDeleteShader( mFragmentObject );
 +        mFragmentObject = 0;
 +    }
++#endif
 +
 +    if( maHelperTexture ) {
 +        glDeleteTextures( 1, &maHelperTexture );
@@ -238,7 +238,7 @@
  }
  
  OGLTransitionImpl::~OGLTransitionImpl()
-@@ -55,11 +80,14 @@ OGLTransitionImpl::~OGLTransitionImpl()
+@@ -55,11 +82,14 @@ OGLTransitionImpl::~OGLTransitionImpl()
      clear();
  }
  
@@ -254,13 +254,14 @@
  }
  
  void OGLTransitionImpl::finish()
-@@ -986,3 +1014,265 @@ void OGLTransitionImpl::makeFadeSmoothly
+@@ -986,3 +1016,273 @@ void OGLTransitionImpl::makeFadeSmoothly
      mmDisplaySlides = &OGLTransitionImpl::displaySlidesFadeSmoothly;
      mbUseMipMapLeaving = mbUseMipMapEntering = false;
  }
 +
 +static GLuint linkProgram( const char *vertexShader, const char *fragmentShader )
 +{
++#ifdef GL_VERSION_2_0
 +    GLhandleARB vertexObject, fragmentObject, programObject;
 +    GLint vertexCompiled, fragmentCompiled, programLinked;
 +    char log[1024];
@@ -302,6 +303,9 @@
 +    OSL_TRACE("checkpoint 3: program linked (%d)", glGetError() == GL_NO_ERROR);
 +
 +    return programObject;
++#else
++    return 0;
++#endif
 +}
 +
 +static const char* basicVertexShader = "\n\
@@ -431,6 +435,7 @@
 +
 +void OGLTransitionImpl::preparePermShader()
 +{
++#ifdef GL_VERSION_2_0
 +    if( mProgramObject ) {
 +        glUseProgram( mProgramObject );
 +
@@ -454,6 +459,7 @@
 +            glUniform1i( location, 2 );  // texture unit 2
 +        }
 +    }
++#endif
 +}
 +
 +void OGLTransitionImpl::prepareStatic( ::sal_Int32 /* glLeavingSlideTex */, ::sal_Int32 /* glEnteringSlideTex */ )
@@ -468,12 +474,14 @@
 +{
 +    applyOverallOperations( nTime, SlideWidthScale, SlideHeightScale );
 +
++#ifdef GL_VERSION_2_0
 +    if( mProgramObject ) {
 +        GLint location = glGetUniformLocation( mProgramObject, "time" );
 +        if( location != -1 ) {
 +            glUniform1f( location, nTime );
 +        }
 +    }
++#endif
 +
 +    glActiveTexture( GL_TEXTURE2 );
 +    glBindTexture( GL_TEXTURE_2D, glEnteringSlideTex );
@@ -520,9 +528,9 @@
 +
 +    mnRequiredGLVersion = 2.0;
 +}
-diff -rup ../ooh680-m8/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx
---- ../ooh680-m8/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx	2008-03-06 20:57:35.000000000 +0100
-+++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx	2008-03-06 11:50:24.000000000 +0100
+diff -rup slideshow/source/engine/OGLTrans-orig/OGLTrans_TransitionImpl.hxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx
+--- slideshow/source/engine/OGLTrans-orig/OGLTrans_TransitionImpl.hxx	2008-03-10 16:48:29.000000000 +0100
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx	2008-03-10 16:44:56.000000000 +0100
 @@ -55,18 +55,25 @@ public:
      OGLTransitionImpl() :
          mbUseMipMapLeaving( true ),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]