Skip to content

render: Add SDL_RenderGeometryRawColor8Bits for 8-bit color vertex input#15136

Closed
alattanzio wants to merge 2 commits into
libsdl-org:mainfrom
alattanzio:Add-SDL_RenderGeometryRawColor8Bits-for-8-bit-color-vertex-input
Closed

render: Add SDL_RenderGeometryRawColor8Bits for 8-bit color vertex input#15136
alattanzio wants to merge 2 commits into
libsdl-org:mainfrom
alattanzio:Add-SDL_RenderGeometryRawColor8Bits-for-8-bit-color-vertex-input

Conversation

@alattanzio

Copy link
Copy Markdown
Contributor

Adds SDL_RenderGeometryRawColor8Bits to allow passing vertex color data as 8-bit components (SDL_Color) directly.

Key Changes:

  • New function SDL_RenderGeometryRawColor8Bits for 8-bit vertex input.
  • Removes the need for manual float/packed-int conversion by the user.
  • Consistent with existing SDL_RenderGeometryRaw logic.

Comment thread src/dynapi/SDL_dynapi_overrides.h Outdated
Comment thread src/dynapi/SDL_dynapi_procs.h Outdated
@slouken

slouken commented Mar 1, 2026

Copy link
Copy Markdown
Collaborator

This is an easy wrapper you can have in your own code. I don't think we'll add this to the SDL API surface.

@slouken slouken closed this Mar 1, 2026
@alattanzio

Copy link
Copy Markdown
Contributor Author

This is an easy wrapper you can have in your own code. I don't think we'll add this to the SDL API surface.

I agree. I created this PR because I thought this wrapper might help other developers who are migrating from SDL2 to SDL3, like I’ve been doing. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants