From f655c10faf6813194691c857b33296b650784772 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 25 Apr 2008 23:15:52 -0400 Subject: [PATCH] API design change. We'll reference count shaders/programs internally so there's no concern about deleting an in-use object. --HG-- branch : trunk --- mojoshader.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mojoshader.h b/mojoshader.h index aa9ae634..a3ea8ab8 100644 --- a/mojoshader.h +++ b/mojoshader.h @@ -513,8 +513,8 @@ void MOJOSHADER_glProgramReady(void); * Free the resources of a linked program. This will delete the GL object * and free memory. * - * You must not call this on a bound program! Either bind a different one - * or call MOJOSHADER_glBindProgram(NULL) first to unbind it. + * If the program is currently bound by MOJOSHADER_glBindProgram(), it will + * be deleted as soon as it becomes unbound. */ void MOJOSHADER_glDeleteProgram(const MOJOSHADER_glProgram *program); @@ -522,8 +522,8 @@ void MOJOSHADER_glDeleteProgram(const MOJOSHADER_glProgram *program); * Free the resources of a compiled shader. This will delete the GL object * and free memory. * - * You must not call this on a shader that's currently linked in a program. - * Call MOJOSHADER_glDeleteProgram() on any programs, first. + * If the shader is currently referenced by a linked program, it will + * be deleted as soon as all referencing programs are deleted, too. */ void MOJOSHADER_glDeleteShader(const MOJOSHADER_glShader *shader);