mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-28 20:54:00 +08:00
exercise glDeleteProgramsARB
This commit is contained in:
parent
7a28156666
commit
a7e6f7ba35
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user