Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend SDL2 Renderer and SDL2-video-demo #208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ppebb
Copy link

@ppebb ppebb commented Jan 17, 2025

This PR Implements CLAY_RENDER_COMMAND_TYPE_IMAGE and CLAY_RENDER_COMMAND_TYPE_BORDER for SDL2. It uses SDL_image for loading an example PNG.

For CLAY_IMAGE, the imageData provided is just the SDL surface returned by SDL_image's load functions.

Corner radii have not been implemented because drawing circular geometry with SDL2 requires a lot of work from any examples I found. Perhaps it can come in a later PR.

Both elements have been added to SDL-video-demo to provide examples, although I wasn't sure where to put them or what to do so I just put them in the top left corner.

Implements CLAY_RENDER_COMMAND_TYPE_IMAGE and
CLAY_RENDER_COMMAND_TYPE_BORDER for SDL2.

Both have been added to SDL-video-demo to provide examples.
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.

1 participant