-
Notifications
You must be signed in to change notification settings - Fork 310
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
Implement a DirectX 11 renderer #675
base: master
Are you sure you want to change the base?
Conversation
Not usable in current state.
This allows users to render to a render target which may either be the swapchain (in most cases it will be) or a render texture which may then be used elsewhere (eg in a 3D scene).
We should provide a image loader (in this case the uncompressed TGA loader), but should also allow users using this renderer backend to overload it with their own one. E.g. a user may have libpng in their project and they want to hook libpng into the load image function to load PNGs.
Not finished. Flickering
Eliminates errors in the debug layer
Currently broken. Needs more work
Also add early exit in the case of a kernel of size 0
Ohh nice PR @hyblocker, I was also trying to implement DX11 renderer by myself. |
The PR is practically ready for merging, I'm waiting for the weekend to find the time to implement the GLFW backend and then I'll move this from draft status. Transient buffers should still be investigated if possible but my schedule has been getting busier lately, so I think it makes more sense to merge it as a separate PR later. |
I've implemented a DirectX 11 backend for RmlUI. Currently this has feature parity with the SDL renderer, but I plan on extending it to match the GL3 renderer in the near future (hence I'm marking this as a draft PR).
As for backends, currently this only has an implementation with the Win32 backend. I'll also be providing a GLFW backend at a later point.
I've introduced a pair of functions pointers only in the DX11
RenderInterface
for this backend to make it more flexible and easily consumable by end users. As the current backends only support uncompressed targa files for images, and in practice one would likely want to connect it to a texture loader or something more sophisticated such as stb_image, I defined the following functions:Where a user may override these as follows for example:
The renderer will fallback to the Targa image loader if the user doesn't override the loader with their own one.
For completeness, below is the entire STB image loader I've been testing with. I have converted the sample assets to PNG to verify that it works correctly.