imgui icon indicating copy to clipboard operation
imgui copied to clipboard

fix MacOS sdlrenderer example

Open developer239 opened this issue 3 years ago • 4 comments

examples/example_sdl_sdlrenderer is unnecessarily complex and doesn't work properly on Mac. (Ventura 13.0.1) We can keep it as it is but I would like to fix the UI so that other Mac users can get ImGui easily up and running.

The SDL_WINDOW_ALLOW_HIGHDPI is not worth the confusion it can cause to new ImGui users.

Before:

https://user-images.githubusercontent.com/14946081/204870192-670ee9f9-2c20-4ebe-bc1c-541d2b7a86ef.mp4

After:

https://user-images.githubusercontent.com/14946081/204870209-e9f464b0-599d-42a3-9bd1-f9ad7939e5dc.mp4

developer239 avatar Nov 30 '22 17:11 developer239

Can you confirm how unmodified example_sdl_opengl3 and example_glfw_opengl3 perform on that same setup?

ocornut avatar Dec 01 '22 17:12 ocornut

@ocornut Sure I will take a look at it tonight or tomorrow 🙂

developer239 avatar Dec 01 '22 17:12 developer239

Any update @developer239 ?

Also what did you mean by "examples/example_sdl_sdlrenderer is unnecessarily complex" ?

I am finding it difficult to understand how it could be made any simpler... It is about 160 lines, including about 45 lines of comments and 35 lines of ImGui demo code. It seems as lean as it could be.

ocornut avatar Jan 02 '23 18:01 ocornut

@ocornut After playing around with it for a while I think the example is actually great. 🙂 Other than that I didn't have time to check how it works with opengl yet.

developer239 avatar Jan 03 '23 16:01 developer239