[gegl/gsoc2009-gpu] Implement proper texture read-backs
- From: Jerson Michael Perpetua <jperpetua src gnome org>
- To: svn-commits-list gnome org
- Subject: [gegl/gsoc2009-gpu] Implement proper texture read-backs
- Date: Wed, 8 Jul 2009 20:27:51 +0000 (UTC)
commit 9407820d1d0e5919cf871ed21c7edc54d9d0cfc8
Author: Jerson Michael Perpetua <jersonperpetua gmail com>
Date: Thu Jul 9 03:51:04 2009 +0800
Implement proper texture read-backs
Implement proper texture read-backs 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 7083cf0..c366ace 100644
--- a/gegl/gpu/gegl-gpu-texture.c
+++ b/gegl/gpu/gegl-gpu-texture.c
@@ -93,6 +93,14 @@ gegl_gpu_texture_get (const GeglGpuTexture *texture,
else
buf = dest;
+ glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
+ GL_COLOR_ATTACHMENT0_EXT,
+ GL_TEXTURE_RECTANGLE_ARB,
+ texture->handle,
+ 0);
+
+ glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
+
if (roi == NULL || (roi->x == 0 && roi->y == 0
&& roi->width == texture->width
&& roi->height == texture->height))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]