Issue #23: added 'debug only' flag; added checks for OpenGL render thread; added glProgram wrapper