Bug 1115

Summary: SRGB implementation
Product: [JogAmp] Jogl Reporter: Giuseppe Barbieri <elect86>
Component: coreAssignee: Sven Gothel <sgothel>
Status: UNCONFIRMED ---    
Severity: enhancement CC: sgothel
Priority: ---    
Version: tbd   
Hardware: All   
OS: all   
Type: FEATURE SCM Refs:
Workaround: ---

Description Giuseppe Barbieri 2015-01-07 11:06:56 CET
So, we would need a GLCapabilities extension for colorspace selection.
Maybe this has to be defined in it's parent Capabilities, allowing to
select the default framebuffer / pixelformat (-> onscreen).

This 'Capabilities.colorspace' entry shall be utilized for
[1] onscreen drawables and [2] offscreen FBO drawables, if available.

<https://en.wikipedia.org/wiki/SRGB>

Capabilities.colorspace might be of an integer or enum type
w/ (currently known) values: lRGB (default, linear) and sRGB (standardized RGB).
We may refactor TextureData.Colorspace and extend it's type accordingly.

Onscreen drawables will require assistance of EGL, GLX, EGL ..,
where FBO offscreen can be supported merely by 'some' GL extension(s).

Implementation
==================
<https://en.wikipedia.org/wiki/SRGB#Usage> refers to EXT/framebuffer_sRGB
<https://www.opengl.org/registry/specs/EXT/framebuffer_sRGB.txt>
which will allow implementing [2]!

Note: While FBObject shall support sRGB naturally,
one can already use above extension in their own code using textures and FBOs.

It has to be seen, whether implementation of [1] is supported, i.e. possible. 


Reference thread:
http://forum.jogamp.org/Proper-gamma-aware-rendering-td4030515.html
Comment 1 Sven Gothel 2015-06-22 19:51:54 CEST
Further input / experiences w/ sRGB:

04/03/2010 Using sRGB color space with OpenGL
<http://www.g-truc.net/post-0263.html>
Comment 2 Sven Gothel 2015-06-22 20:06:36 CEST
March 2015 OpenGL drivers status and FB sRGB conversions
<http://www.g-truc.net/post-0720.html#menu>