summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2014-04-30 14:05:11 +0300
committerTapani Pälli <tapani.palli@intel.com>2014-05-06 07:30:50 +0300
commit9c326a34e088971a3c11b2e5289cd1a8e4d439df (patch)
tree975461e5219a58f8ea0fd1e9fe193f8b400b8962
parentf827282a995db88f76666649cdd43b0a3cbc008f (diff)
downloadmesa-demos-9c326a34e088971a3c11b2e5289cd1a8e4d439df.zip
mesa-demos-9c326a34e088971a3c11b2e5289cd1a8e4d439df.tar.xz
drawtex: resolve glDrawTexfOES extension function
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78101 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r--src/egl/opengles1/drawtex.c10
1 files changed, 9 insertions, 1 deletions
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();