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

Ian Romanick idr at freedesktop.org
Mon May 5 10:04:09 PDT 2014


Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

Thanks Tapani.

On 05/04/2014 10:22 PM, Tapani Pälli wrote:
> 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();
> 



More information about the mesa-dev mailing list