Closed wkjarosz closed 10 months ago
Thanks a lot.
I merged your PR, into the master and edr branch. I do agree with your remark " I personally prefer to minimize the need for #if defined directives".
I will probably soon delete the edr branch, unless you want to add something in it.
I added a specific demo for EDR:
(this screenshot probably cannot render EDR colors, so this is an approximation)
See its code: [hello_edr.mm]((https://github.com/pthom/hello_imgui/blob/master/src/hello_imgui_demos/hello_edr/hello_edr.mm)
I tried to incorporate comments where I could, but beyond doxygen, I don't know the syntax of your particular documentation generation tool, so you may need to adjust.
The documentation format was weird. Now, you just add standard C++ documentation
between @@md
markers, and it is then automatically included in the doc
Thanks. I'll give it a try and let you know if I run into any problems.
I've confirmed the merged master branch works for me, so feel free to delete this edr branch.
This PR addresses #78.
Some notes on my proposed solution:
In user code, I personally prefer to minimize the need for
#if defined
directives to choose between various options. So, I removed theMetalOptions
struct, and instead created a shared bool option to request a float buffer. Since even on Metal this may not always be supported (or you may not always want to create a float buffer), I also created a function to check if the system supports Edr floating point framebuffers. This returns false on all systems, except on Metal it checks the underlying system for support. If this returns true, you can setrequestFloatBuffer
to true to get an EDR-compatible framebuffer. If in the future we figure out how to do this in Vulkan, DirectX or OpenGL, we can reimplement this functon for those backends and reuse this bool option.I made a small chance to the docking demo to do this to verify it works.
I tried to incorporate comments where I could, but beyond doxygen, I don't know the syntax of your particular documentation generation tool, so you may need to adjust.