Skip to content

SDL2's SDL_Surface CPU rasterizer/backend#9137

Open
momo-AUX1 wants to merge 13 commits intoocornut:masterfrom
momo-AUX1:sdl2_cpu
Open

SDL2's SDL_Surface CPU rasterizer/backend#9137
momo-AUX1 wants to merge 13 commits intoocornut:masterfrom
momo-AUX1:sdl2_cpu

Conversation

@momo-AUX1
Copy link

This PR adds the SDL Render CPU rasterizer support, useful platforms that dont expose a Renderer/GPU abstraction or projects such as bochs that use the blitzer.

@momo-AUX1 momo-AUX1 closed this Dec 25, 2025
@ocornut
Copy link
Owner

ocornut commented Dec 25, 2025

Hello,
Why closing this ?

@momo-AUX1
Copy link
Author

I tried testing it on bochs and I saw some artifacting I thought it was a code issue but it worked

@momo-AUX1
Copy link
Author

I will reopen

@momo-AUX1 momo-AUX1 reopened this Dec 25, 2025
@ocornut
Copy link
Owner

ocornut commented Mar 11, 2026

Hello,

I believe it would be too difficult for me to reliably maintain/support this in an official manner.
Particularly as a software rasterizer may be further optimizer and this seems currently far from peek performance.

I think it is a valuable project, how about you host this on your own repository and we can add all links from Wiki?
e.g. I suggest your repository can mimic imgui structures:

backends/imgui_impl_sdlsurface2.cpp, h
examples/example_sdl2_surface/main.cpp

Since your code was already well design to "blend in" imgui habits (thanks for that!) it would be easy for anyone to import those files.

Linking to other software renderers:
https://github.com/ocornut/imgui/wiki/Bindings#Software-RenderersRasterizers

@ocornut ocornut changed the title Sdl2 Surface CPU Backend SDL2's SDL_Surface CPU rasterizer/backend Mar 11, 2026
@momo-AUX1
Copy link
Author

hello,

yes of course I'd love that, thank you !

@ocornut
Copy link
Owner

ocornut commented Mar 11, 2026

Great! I'll wait for your signal/url and then will add links from all suitable wiki/docs locations.

@momo-AUX1
Copy link
Author

https://github.com/momo-AUX1/imgui/tree/sdl_cpu

here is the url this one includes perf fixes and a new SDL3 surface tested on macOS and the web

@ocornut
Copy link
Owner

ocornut commented Mar 13, 2026

To augment discovery and updates here are my suggestion:

  • this should be a new repository called e.g. momo-AUX1/imgui_impl_sdlsurface
  • and only contains the new files (examples/ + backends/ files)
  • being a new repository, the changes to imgui_examples.sln, docs/BACKENDS.md, docs/EXAMPLES.md unfortunately cannot be included (*).

But I think overall this would make it more attractive and easy for people to use this, and update may be carried without confusion.

What do you think?

@momo-AUX1
Copy link
Author

Of course I'll do this tonight thank you for your help and review !

@momo-AUX1
Copy link
Author

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants