In 2.79 you could use Blender’s built in color management for viewport rendering via something like (in the RenderEngine)
if self.support_display_space_shader(context.scene):
self.bind_display_space_shader(context.scene)
# draw some OpenGL stuff
if self.support_display_space_shader(context.scene):
self.unbind_display_space_shader()
This appears to not have any effect in Blender 2.80. Is this expected? Or a bug? Or some other preferred way?
We need to update the documentation for this. The issue is that we switched to OpenGL core profile, which means there are no more builtin position and texture coordinate attributes and no immediate mode.
I guess that makes sense about the shader. However what does this mean for a rendering addon calling from python? We have to set up a similar shader in our BGL code? rather than use that simple call to bind the old shader? Not a horrible issue, just want to be clear on the way forward.
Also if documentation was made clear on this that would be great.