diff options
Diffstat (limited to 'patches')
| -rw-r--r-- | patches/OpenCSG-1.3.0-FBO.patch | 80 | ||||
| -rw-r--r-- | patches/OpenCSG-1.3.0-MacOSX-port.patch | 4 | 
2 files changed, 83 insertions, 1 deletions
| diff --git a/patches/OpenCSG-1.3.0-FBO.patch b/patches/OpenCSG-1.3.0-FBO.patch new file mode 100644 index 0000000..150a12e --- /dev/null +++ b/patches/OpenCSG-1.3.0-FBO.patch @@ -0,0 +1,80 @@ +diff -ru OpenCSG-1.3.0/src/frameBufferObject.cpp OpenCSG-1.3.0-fbofix/src/frameBufferObject.cpp +--- OpenCSG-1.3.0/src/frameBufferObject.cpp	2010-02-06 21:35:10.000000000 +0100 ++++ OpenCSG-1.3.0-fbofix/src/frameBufferObject.cpp	2011-08-02 01:33:31.000000000 +0200 +@@ -57,6 +57,7 @@ +             glGenRenderbuffers(1, &depthID);  +             glGenTextures(1, &textureID); +  ++            glGetIntegerv(GL_FRAMEBUFFER_BINDING, &oldFramebufferID); +             glBindFramebuffer(GL_FRAMEBUFFER, framebufferID); +             glBindTexture(GL_TEXTURE_2D, textureID); +             glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_INT, 0); +@@ -76,7 +77,7 @@ +                 return false; +             } +  +-            glBindFramebuffer(GL_FRAMEBUFFER, 0); ++            glBindFramebuffer(GL_FRAMEBUFFER, oldFramebufferID); +             glBindTexture(GL_TEXTURE_2D, 0); +  +             textureTarget = GL_TEXTURE_2D; +@@ -133,7 +134,7 @@ +         // Unbinds frame buffer texture. +         bool FrameBufferObject::EndCapture() +         { +-            glBindFramebuffer(GL_FRAMEBUFFER, 0); ++            glBindFramebuffer(GL_FRAMEBUFFER, oldFramebufferID); +             return true; +         } +  +diff -ru OpenCSG-1.3.0/src/frameBufferObject.h OpenCSG-1.3.0-fbofix/src/frameBufferObject.h +--- OpenCSG-1.3.0/src/frameBufferObject.h	2011-08-02 17:30:01.000000000 +0200 ++++ OpenCSG-1.3.0-fbofix/src/frameBufferObject.h	2011-08-02 01:32:58.000000000 +0200 +@@ -83,6 +83,7 @@ +             unsigned int depthID; +  +             unsigned int framebufferID; ++            int oldFramebufferID; +  +             bool         initialized; +         }; +diff -ru OpenCSG-1.3.0/src/frameBufferObjectExt.cpp OpenCSG-1.3.0-fbofix/src/frameBufferObjectExt.cpp +--- OpenCSG-1.3.0/src/frameBufferObjectExt.cpp	2010-02-06 21:35:10.000000000 +0100 ++++ OpenCSG-1.3.0-fbofix/src/frameBufferObjectExt.cpp	2011-08-02 01:33:46.000000000 +0200 +@@ -58,6 +58,7 @@ +             glGenRenderbuffersEXT(1, &depthID);  +             glGenTextures(1, &textureID); +  ++            glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &oldFramebufferID); +             glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebufferID);	 +             glBindTexture(GL_TEXTURE_2D, textureID); +             glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_INT, 0); +@@ -77,7 +78,7 @@ +                 return false; +             } +  +-            glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); ++            glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, oldFramebufferID); +             glBindTexture(GL_TEXTURE_2D, 0); +  +             textureTarget = GL_TEXTURE_2D; +@@ -134,7 +135,7 @@ +         // Unbinds frame buffer texture. +         bool FrameBufferObjectExt::EndCapture() +         { +-            glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); ++            glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, oldFramebufferID); +             return true; +         } +  +diff -ru OpenCSG-1.3.0/src/frameBufferObjectExt.h OpenCSG-1.3.0-fbofix/src/frameBufferObjectExt.h +--- OpenCSG-1.3.0/src/frameBufferObjectExt.h	2010-02-06 21:35:10.000000000 +0100 ++++ OpenCSG-1.3.0-fbofix/src/frameBufferObjectExt.h	2011-08-02 01:33:08.000000000 +0200 +@@ -83,6 +83,7 @@ +             unsigned int depthID; +  +             unsigned int framebufferID; ++            int oldFramebufferID; +  +             bool         initialized; +         }; diff --git a/patches/OpenCSG-1.3.0-MacOSX-port.patch b/patches/OpenCSG-1.3.0-MacOSX-port.patch index bb55165..e8eaa92 100644 --- a/patches/OpenCSG-1.3.0-MacOSX-port.patch +++ b/patches/OpenCSG-1.3.0-MacOSX-port.patch @@ -1102,7 +1102,7 @@ diff -ru OpenCSG-1.3.0/src/channelManager.cpp OpenCSG-1.3.0-mac/src/channelManag  diff -ru OpenCSG-1.3.0/src/frameBufferObject.h OpenCSG-1.3.0-mac/src/frameBufferObject.h  --- OpenCSG-1.3.0/src/frameBufferObject.h	2010-02-06 21:35:10.000000000 +0100  +++ OpenCSG-1.3.0-mac/src/frameBufferObject.h	2010-05-09 02:51:36.000000000 +0200 -@@ -79,10 +79,10 @@ +@@ -79,11 +79,11 @@               /// Texture stuff               GLenum       textureTarget; @@ -1112,7 +1112,9 @@ diff -ru OpenCSG-1.3.0/src/frameBufferObject.h OpenCSG-1.3.0-mac/src/frameBuffer  +            GLuint depthID;  -            unsigned int framebufferID; +-            int oldFramebufferID;  +            GLuint framebufferID; ++            GLint oldFramebufferID;               bool         initialized;           }; | 
