summaryrefslogtreecommitdiff
path: root/src/mesa/main/program.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-01-13 16:14:09 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-01-13 16:14:09 +0000
commit7a28156666f73a4e89354bd06acecaa6bfb8f9f4 (patch)
treeb195dd5e9975cd22b0e011bc4671617aa00b303b /src/mesa/main/program.c
parent1e274517b83cc563fb1ab4e5c62753b2410943ee (diff)
glDeleteProgramsARB() failed for fragment programs (bug 876160)
Diffstat (limited to 'src/mesa/main/program.c')
-rw-r--r--src/mesa/main/program.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/main/program.c b/src/mesa/main/program.c
index 9a081ece20..83bbb20492 100644
--- a/src/mesa/main/program.c
+++ b/src/mesa/main/program.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 5.1
+ * Version: 6.0
*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -182,7 +182,6 @@ _mesa_alloc_program(GLcontext *ctx, GLenum target, GLuint id)
/**
* Delete a program and remove it from the hash table, ignoring the
* reference count.
- * \note Called from the GL API dispatcher.
*/
void
_mesa_delete_program(GLcontext *ctx, struct program *prog)
@@ -197,7 +196,8 @@ _mesa_delete_program(GLcontext *ctx, struct program *prog)
if (vprog->Instructions)
_mesa_free(vprog->Instructions);
}
- else if (prog->Target == GL_FRAGMENT_PROGRAM_NV) {
+ else if (prog->Target == GL_FRAGMENT_PROGRAM_NV ||
+ prog->Target == GL_FRAGMENT_PROGRAM_ARB) {
struct fragment_program *fprog = (struct fragment_program *) prog;
if (fprog->Instructions)
_mesa_free(fprog->Instructions);
@@ -919,7 +919,8 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids)
_mesa_BindProgram(prog->Target, 0);
}
}
- else if (prog->Target == GL_FRAGMENT_PROGRAM_NV) {
+ else if (prog->Target == GL_FRAGMENT_PROGRAM_NV ||
+ prog->Target == GL_FRAGMENT_PROGRAM_ARB) {
if (ctx->FragmentProgram.Current &&
ctx->FragmentProgram.Current->Base.Id == ids[i]) {
/* unbind this currently bound program */