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

Brian Paul brianp at vmware.com
Mon May 5 06:48:00 PDT 2014


On 05/04/2014 11:22 PM, Tapani Pälli wrote:
> Bugzilla: https://urldefense.proofpoint.com/v1/url?u=https://bugs.freedesktop.org/show_bug.cgi?id%3D78101&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=3nZFINPzyuZlUOeQ3unnezx6v2U8BbLSYKVaixUZyo4%3D%0A&s=a93bc14795ff8d399d257b88dc5bdb513fe065dc3d13beba346f3e3c2a525712
> 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();
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list