[gegl/gsoc2009-gpu] Implement proper texture to texture copies



commit 943fe92efcc59d05db96bd683ab4e364edbddf58
Author: Jerson Michael Perpetua <jersonperpetua gmail com>
Date:   Thu Jul 9 04:05:53 2009 +0800

    Implement proper texture to texture copies
    
    Implement proper texture to texture copies through an
    offscreen framebuffer.

 gegl/gpu/gegl-gpu-texture.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gegl/gpu/gegl-gpu-texture.c b/gegl/gpu/gegl-gpu-texture.c
index c366ace..f082fa7 100644
--- a/gegl/gpu/gegl-gpu-texture.c
+++ b/gegl/gpu/gegl-gpu-texture.c
@@ -212,6 +212,14 @@ gegl_gpu_texture_copy (const GeglGpuTexture *src,
                        gint                  dest_x,
                        gint                  dest_y)
 {
+  glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, 
+                            GL_COLOR_ATTACHMENT0_EXT, 
+                            GL_TEXTURE_RECTANGLE_ARB,
+                            src->handle,
+                            0);
+
+  glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
+
   if (src->format == dest->format)
     {
       glFramebufferTexture2DEXT (GL_FRAMEBUFFER_EXT,



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