Demos (master): drawtex: resolve glDrawTexfOES extension function

Tapani Pälli tpalli at kemper.freedesktop.org
Tue May 6 04:32:58 UTC 2014


Module: Demos
Branch: master
Commit: 9c326a34e088971a3c11b2e5289cd1a8e4d439df
URL:    http://cgit.freedesktop.org/mesa/demos/commit/?id=9c326a34e088971a3c11b2e5289cd1a8e4d439df

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Wed Apr 30 14:05:11 2014 +0300

drawtex: resolve glDrawTexfOES extension function

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78101
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/egl/opengles1/drawtex.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/egl/opengles1/drawtex.c b/src/egl/opengles1/drawtex.c
index 524f931..1ba8ac7 100644
--- a/src/egl/opengles1/drawtex.c
+++ b/src/egl/opengles1/drawtex.c
@@ -25,13 +25,14 @@ static GLfloat width = 200, height = 200;
 static GLboolean animate = GL_FALSE;
 static int win;
 
+static PFNGLDRAWTEXFOESPROC glDrawTexfOES_func = NULL;
 
 static void
 draw(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
 
-   glDrawTexfOES(view_posx, view_posy, 0.0, width, height);
+   glDrawTexfOES_func(view_posx, view_posy, 0.0, width, height);
 }
 
 
@@ -128,6 +129,13 @@ init(void)
       exit(1);
    }
 
+   glDrawTexfOES_func = eglGetProcAddress("glDrawTexfOES");
+
+   if (!glDrawTexfOES_func) {
+      fprintf(stderr, "Sorry, failed to resolve glDrawTexfOES function\n");
+      exit(1);
+   }
+
    glClearColor(0.4, 0.4, 0.4, 0.0);
 
    make_smile_texture();




More information about the mesa-commit mailing list