Mesa (master): progs/egl: glGenTextures is called too early in xeglbindtex.

Chia-I Wu olv at kemper.freedesktop.org
Tue Jan 12 03:21:26 UTC 2010


Module: Mesa
Branch: master
Commit: c657c80180255b859b9229a994d111115aaf198d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c657c80180255b859b9229a994d111115aaf198d

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Sat Jan  2 21:57:16 2010 +0800

progs/egl: glGenTextures is called too early in xeglbindtex.

It should be called after eglMakeCurrent.

Signed-off-by: Chia-I Wu <olvaffe at gmail.com>

---

 progs/egl/xeglbindtex.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/progs/egl/xeglbindtex.c b/progs/egl/xeglbindtex.c
index 7e35534..de0ede9 100644
--- a/progs/egl/xeglbindtex.c
+++ b/progs/egl/xeglbindtex.c
@@ -79,8 +79,6 @@ make_pbuffer(int width, int height)
       printf("failed to allocate pbuffer\n");
       exit(1);
    }
-
-   glGenTextures(1, &tex_pbuf);
 }
 
 static void
@@ -114,6 +112,8 @@ use_pbuffer(void)
       glTranslatef(0.0, 0.0, -5.0);
 
       glClearColor(0.2, 0.2, 0.2, 0.0);
+
+      glGenTextures(1, &tex_pbuf);
    }
 }
 




More information about the mesa-commit mailing list