AlexvZyl / NativeFramework

💡 A GPU-accelerated native application framework, with performance and scalability at its core. Written in C++ using GLFW, OpenGL and dear imgui.
4 stars 1 forks source link

Implement bgfx backend #450

Open AlexvZyl opened 2 years ago

AlexvZyl commented 2 years ago

We can swop out our direct OpenGL calls with bgfx calls which supports all of the backend types (OpenGL, Vulkan, Metal, etc). This will improve the Renderer performance and cross-platform compatibility.

Currently everything is being done with OpenGL, so we will have to refactor shaders, framebuffers, vertexbuffers etc. This should not take too long and the current Renderer API will be kept the same. We will also still keep GraphicsPrimitivesBuffer so that we can keep using FreeLists.

AlexvZyl commented 2 years ago

@Cullen-Enerdyne I think this will work very nicely. We still have the control over graphics and memory we want and can use bgfx to use any API we want, depending on the platform and without having to change anything. In addition to this, we can see how they render text, textures, etc. and see if we want to incorporate it into our engine. I do not think they use MSDF for text, so I might not use their text renderer.

AlexvZyl commented 2 years ago

This library is awesome, it even supports multi-threading the renderer and order independent transparency. Implementing this alongside our Entities and FreeLists can make for something very nice.

AlexvZyl commented 2 years ago

Minecraft (bedrock) uses this library for rendering :)