activate and deactivate the shader program at correct times