[Mesa-dev] [PATCH] drawtex: resolve glDrawTexfOES extension function

Tapani Pälli tapani.palli at intel.com
Sun May 4 22:22:03 PDT 2014


Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78101
Signed-off-by: Tapani Pälli <tapani.palli 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();
-- 
1.8.3.1



More information about the mesa-dev mailing list