Login  Register

Re: Proper gamma-aware rendering

Posted by elect on Dec 19, 2014; 2:12pm
URL: https://forum.jogamp.org/Proper-gamma-aware-rendering-tp4030515p4033788.html

Sven Gothel wrote
This is not a canonical reference,
hence your assumption would need some reason,
e.g. a EGL, GLX, WGL .. reference.

As I understand, you assume either:
  [1] SRGB selection as a context property
  This does not exist in the GL spec.

  [2] SRGB selection as a pixelformat property
  We have to look, but I doubt.

One may select SRGB texture formats, GL spec.

I am unaware of a generic overall SRGB mode,
but if you have information about it (GL, EGL, ..)
that would be great.

~Sven

signature.asc (828 bytes) <http://forum.jogamp.org/attachment/4033786/0/signature.asc>
Unfortunately documentation over internet regarding sRGB for the default framebuffer lacks. What I linked is the only source mentioning something about it and therefore this is the only thing my assumption is based on. I had the hint of the context reading this guy

http://stackoverflow.com/questions/25842211/opengl-srgb-framebuffer-oddity

In the GL pipeline one should work in linear RGB (lRGB). OpenGL offers all the tools to make it without any additional modification for the devs and, more important, free performance-wise. This means sRGB textures as input will be translated automatically to lRGB and output textures to sRGB, default framebuffer included, if properly configured.

Scanning Jogl, I found some interesting variables about the same thema

EGL.java
  public static final int EGL_VG_COLORSPACE_sRGB = 0x3089;
  public static final int EGL_VG_COLORSPACE_LINEAR = 0x308A;
WGLExt.java
  public static final int WGL_ARB_framebuffer_sRGB = 1;
  public static final int WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20A9;
  public static final int WGL_EXT_framebuffer_sRGB = 1;
  public static final int WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20A9;
GLX.java
  public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20B2;
 public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20B2;

I hope that helps