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

Support SDL_Renderer for rendering #670

Closed
DragonSWDev opened this issue Sep 17, 2022 · 2 comments
Closed

Support SDL_Renderer for rendering #670

DragonSWDev opened this issue Sep 17, 2022 · 2 comments

Comments

@DragonSWDev
Copy link

Is your feature request related to a problem? Please describe.
Dear ImGUI has support for SDL_Renderer as renderer that let's use Dear ImGUI with SDL2 without any additional rendering libraries. SDL_Renderer can be hardware accelerated but can also work without it with software rendering. In some places it can be useful thing to have. If I'm not mistaken imgui-rs supports SDL2 as platform but doesn't support SDL_Renderer.

Describe the solution you'd like
Add support for SDL_Renderer.

Describe alternatives you've considered
Software accelerated OpenGL, DirectX and other APIs can be considered as alternative but compared to SDL_Renderer you still needs to basically write your own renderer while you don't have to do it with SDL_Renderer as it provides pretty clean and easy to use API for copying bitmaps from place to place, handles low level stuff etc.

Additional context
Dear ImGUI support for SDL_Renderer started as third party project called imgui_sdl. It's part of Dear ImGUI starting from version 1.85. Old project is still archived on GitHub so maybe it can be useful for making Rust version.

@dbr
Copy link
Contributor

dbr commented Sep 26, 2022

Having a renderer with a software backend would be useful - I started writing a very simple one intended for automated documentation in #482 - but if there's a fully robust oen in SDL that might solve two problems with one

However if someone wants to write this renderer, it is likely best keeping it as a separate project - otherwise it adds more maintenance to the imgui-rs project (which we are already struggling to make time for!)

The goal with the stuff in this repo is basically to have two implementations (two renderers + two platform-support libraries), to ensure we avoid doing anything specific to one. We unfortunately can't support every possible platform (there's just too many possible options and combinations)

@dbr dbr closed this as completed Oct 5, 2022
@DragonSWDev
Copy link
Author

Sounds good to me, thank you for explanation.

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

No branches or pull requests

2 participants