summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-01-13 16:17:21 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-01-13 16:17:21 +0000
commita7e6f7ba35a65bec295052fe8b394a9580c58b20 (patch)
treeab811a62f45b37bed9462545f6e7728edda486ab /progs
parent7a28156666f73a4e89354bd06acecaa6bfb8f9f4 (diff)
exercise glDeleteProgramsARB
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/arbfplight.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/demos/arbfplight.c b/progs/demos/arbfplight.c
index d0b6bc9520..f9112a39f2 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
*/