I'm making great progress at my homemade editor GUI, which should use shaders for skinning.
I'm here because I suffer from bad conscience: I kindly delete my shaders and linked glsl programs with
glDeleteShader() and glDeleteProgram() respectively, as the program replaces an existing shader.
I'm satisfied with that bit; I like cleaning up after myself, and I should do so whenever I can.
Now, the gl names (1, 2, 3 ...) of the shaders and programs are invalidated on a mode change, because I basically initialize OpenGL and Glee all over again, and although calling glDeleteProgram() afterwards (when i know of the mode change) seems logical, glError will
notify me that the names are all wrong; there's nothing such as 1, 2 and 3 in the current gl context(state).
Should I feel bad for not having a display mode change -sequence that
1: Starts when the user toggles fullscreen 2: halts rendering and raises an unload flag 3: Traverses & iterates across all my reloadable objects and unloads them from the GPU. 4: Restarts OpenGL in the desired mode 5: Traverses & iterates the mentioned objects again, this time reloading them to the GPU.
Or rather; will any state of the art GPU handle these things for me, so I can disregard a sequence such as the above?
Thanks in advance guys!