
Need an ability to make SRGB-capable main framebuffer
Posted Friday, 24 June, 2011 - 15:06 by kvark| Project: | The Open Toolkit library |
| Version: | 1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | kvark |
| Status: | in progress |
Jump to:
Description
According to the following spec:
http://www.opengl.org/registry/specs/ARB/framebuffer_sRGB.txt
wglChoosePixelFormatEXT may accept WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB in the list of attributes.
We need to make it available as a flag upon Window/Context creation.


Comments
#1
I've implemented a path for SVN trunk that works for GLX and WGL:
EDIT-1: patch removed. Something is not working yet. I'll post a patch when it works at least under windows...
EDIT-2: here it is - the working patch:
I'm a bit confused about the NativeWindow default constructor. It is called while the platform factory is initialized. The constructor makes a use of GraphicsMode.Default, but how do we dare to access default graphics mode (supposed to be platform-specific) if the platform is not yet initialized? I suggest creating a new dummy GraphicsMode in the NativeWindow constructor, so that the default is not touched.
#2
sRGB is something I've been meaning to implement for some time now. Thanks for the patch I'll review later today and commit.
#3
Just a note for people interested in SRGB support:
On my machine all available graphics modes appear to be SRGB-compatible. Maybe it's a mistake in my OpenTK patch logic, or it's just that ATI Catalyst supports SRGB so easily.
So, If you want to use it right away - just try, maybe it will work without passing any flags to OpenTK (until the patch is committed).
#4