From: Brian Paul Date: Tue, 13 Jan 2004 16:17:21 +0000 (+0000) Subject: exercise glDeleteProgramsARB X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7e6f7ba35a65bec295052fe8b394a9580c58b20;p=mesa.git exercise glDeleteProgramsARB --- diff --git a/progs/demos/arbfplight.c b/progs/demos/arbfplight.c index d0b6bc95200..f9112a39f20 100644 --- a/progs/demos/arbfplight.c +++ b/progs/demos/arbfplight.c @@ -34,6 +34,7 @@ static PFNGLGENPROGRAMSARBPROC glGenProgramsARB_func; static PFNGLPROGRAMSTRINGARBPROC glProgramStringARB_func; static PFNGLBINDPROGRAMARBPROC glBindProgramARB_func; static PFNGLISPROGRAMARBPROC glIsProgramARB_func; +static PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB_func; /* These must match the indexes used in the fragment program */ #define DIFFUSE 1 @@ -128,6 +129,8 @@ static void Key( unsigned char key, int x, int y ) } break; case 27: + glDeleteProgramsARB_func(1, &VertProg); + glDeleteProgramsARB_func(1, &FragProg); exit(0); break; } @@ -261,6 +264,9 @@ static void Init( void ) glIsProgramARB_func = (PFNGLISPROGRAMARBPROC) glutGetProcAddress("glIsProgramARB"); assert(glIsProgramARB_func); + glDeleteProgramsARB_func = (PFNGLDELETEPROGRAMSARBPROC) glutGetProcAddress("glDeleteProgramsARB"); + assert(glDeleteProgramsARB_func); + /* * Fragment program */