SDL on wide gamut

Hi,

Is SDL at all able to use colors with 10 bits
per channel? So far I’ve seen that my driver
selected by default is opengl. And that uses
the format ARGB8888, while the monitors format
would be RGBA1010102. I’ve seen that there is
such a symbol for packed pixels, but I can’t
see, how I would proceed to specify the colors
with this depth. I’m using the proprietary X11
video driver from nVidia for wide gamut
monitors, so I guess that shouldn’t be
considered that exotic anymore after all.

Thanks,–
Cris

Hi,

SDL_Surface, and thus all unaccelerated rendering, is limited to
8bit/channel. This also makes it hard(er) to create a SDL_Texture with
more than 8bit/chan, but there should probably be a way to do
SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB2101010, …)
and fill in the pixel data yourself (with SDL_UpdateTexture()),
but I don’t know if the renderer (OpenGL) context or even the window
would need to be created in a special way to support that - and if so,
whether SDL lets you do that right now.

Cheers,
DanielOn 01.11.2016 11:12, ternaryd wrote:

Hi,

Is SDL at all able to use colors with 10 bits
per channel? So far I’ve seen that my driver
selected by default is opengl. And that uses
the format ARGB8888, while the monitors format
would be RGBA1010102. I’ve seen that there is
such a symbol for packed pixels, but I can’t
see, how I would proceed to specify the colors
with this depth. I’m using the proprietary X11
video driver from nVidia for wide gamut
monitors, so I guess that shouldn’t be
considered that exotic anymore after all.

Thanks,