From c3be3cf1978a7d076a65a75658d115f263c46a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 30 Apr 2014 14:05:11 +0300 Subject: [PATCH] drawtex: resolve glDrawTexfOES extension function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tapani Pälli --- 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..fe3edf5 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 glDrawTexf = NULL; static void draw(void) { glClear(GL_COLOR_BUFFER_BIT); - glDrawTexfOES(view_posx, view_posy, 0.0, width, height); + glDrawTexf(view_posx, view_posy, 0.0, width, height); } @@ -128,6 +129,13 @@ init(void) exit(1); } + glDrawTexf = eglGetProcAddress("glDrawTexfOES"); + + if (!glDrawTexf) { + fprintf(stderr, "Sorry, failed to resolve DrawTexfOES function\n"); + exit(1); + } + glClearColor(0.4, 0.4, 0.4, 0.0); make_smile_texture(); -- 1.8.3.1