SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Add support for single-channel colour formats

Open vs49688 opened this issue 2 years ago • 2 comments

Suggestion - add support for single-channel colour formats in SDL3, e.g.

  • SDL_PIXELFORMAT_R16 - array of 16-bit uints
  • SDL_PIXELFORMAT_R32 - array of 32-bit uints
  • SDL_PIXELFORMAT_RF16 - array of 16-bit floats
  • SDL_PIXELFORMAT_RF32 - array of 32-bit floats

Specifically, these formats could be (ab)used to have SDL_Surface-backed storage for a depth buffer.

vs49688 avatar Aug 25 '23 15:08 vs49688

Sure, go ahead and add a PR and tests in testautomation for them. I'm not sure how they would need to be handled in the blitting code, thoughts?

slouken avatar Aug 25 '23 15:08 slouken

Sure, go ahead and add a PR and tests in testautomation for them.

I'll give it a crack. I'm not familiar with SDL's internals at all though, so don't expect much soon.

I'm not sure how they would need to be handled in the blitting code, thoughts?

Neither, I'll have to have a think about it.

vs49688 avatar Aug 25 '23 15:08 vs49688