View Full Version : unload/upload glsl programs
07-28-2010, 02:47 PM
at what time has a glsl shader program been uploaded to
the gpu ? Is it possible to tell what shader program
has to be uploaded or "removed" from the gpu ?
07-30-2010, 10:07 AM
The answer to a first question is pretty simple. glUseProgram() installs the program object as a part of current rendering state.
Even the answer to a second question is not so hard if I understood it correctly. glDeleteProgram() frees the memory and invalidates the name associated with the program object specified by program. If a program object is in use as part of a current rendering state, it will be flagged for deletion, but it will not be deleted until it is no longer part of current state for any rendering context. To determine whether a program object has been flagged for deletion, call glGetProgram() with arguments program and GL_DELETE_STATUS.
07-30-2010, 10:23 AM
Thanks for the answer, was helpful.
regards & nice weekend,
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.