Some proposals - #7
Conversation
|
OK this will take some time to review, a few comments:
Betsy was commissioned for Godot, thus the way the code was structured was to maximize easiness of integration into other projects, which is why the classes have abstracted GL code away. A key aspect we wish to conserve is that integration (aka copy paste into your own project) should be straightforward. As long as this aspect is preserved I'm cool with it. I wanted to go with Vulkan but time was limited and Vulkan initial setup is harder and we were on a tight budget; which is why we went for OpenGL (they both support GLSL anyway, and 95% of the project is GLSL code) |
|
So to answer some questions:
gli::gl GL(gli::gl::PROFILE_GL33);
gli::gl::format const GLFormat = GL.translate(Texture.format(), Texture.swizzles());
gli::dx DX();
gli::dx::format const DXFormat = DX.translate(Texture.format(), Texture.swizzles());(and so on for Vulkan) |
Oh I see where it's going. More context:
If we're going to use GLI to support Pre-DX10 headers then it makes sense (assuming GLI supports pre-DX10 dds). Otherwise, integrating a large library like GLI just for format conversion sounds overkill when it's only a large switch statement per backend.
OK that sounds very useful! As long as it can be toggled on/off at build time (both for development and for platforms where embedding the files into the exe can prove difficult) |
This is more of a meta PR, asking for changes that make sense to you / you'd accept a PR for: