Skip to content
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

Open
wants to merge 127 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
e74189c
(feat): Add DX11 Win32 Backend to CMakeLists
hyblocker Sep 22, 2024
5be2f24
(feat): Implement stub DX11 backend.
hyblocker Sep 22, 2024
e1da400
(chore): Use spaces instead of tabs
hyblocker Sep 22, 2024
3dbc64b
(feat): Make BeginFrame function take a rendetargetview
hyblocker Sep 22, 2024
89b8376
(feat): Allow users to overload the default image loader
hyblocker Sep 22, 2024
91e517f
(feat): Scissor region
hyblocker Sep 22, 2024
c17d7b2
(fix): Incorrect arguments into Init
hyblocker Sep 22, 2024
651c3ba
(fix): Fix double declaration
hyblocker Sep 22, 2024
5b744c0
(chore): Also require swapchain on begin frame
hyblocker Sep 23, 2024
ccb940c
(chore): Use spaces not tabs
hyblocker Sep 23, 2024
52d1ad9
(chore): Snake case
hyblocker Sep 23, 2024
d830fec
(feat): Create shaders and input layout
hyblocker Sep 23, 2024
db21e66
(fix): Make backend free DX11 resources on shutdown
hyblocker Sep 23, 2024
f22dac3
(fix): Make input layout declaration more compact
hyblocker Sep 23, 2024
53e0e66
(fix): Free all allocated resources on Cleanup
hyblocker Sep 23, 2024
299b69b
(fix): Reset blend state on end frame
hyblocker Sep 23, 2024
4200dac
(fix): Use DEFAULT macros for rasterizer state
hyblocker Sep 23, 2024
b1b3c21
(feat): Add SetTransform support
hyblocker Sep 23, 2024
24a2c38
(feat): Implement CBuffer
hyblocker Sep 23, 2024
d9bab9d
(fix): Link to d3dcompiler
hyblocker Sep 23, 2024
1a723c4
(fix): Enable DX11 debug layer in debug mode
hyblocker Sep 23, 2024
b2e4322
(fix): Remove unnecessary padding in cbuffer
hyblocker Sep 23, 2024
e0705bd
(fix): Initialise descriptors before usage
hyblocker Sep 23, 2024
3e69111
(fix): Feed macros into shader compiler
hyblocker Sep 23, 2024
4880302
(chore): Use nullptr instead of NULL
hyblocker Sep 23, 2024
1572241
(feat): Implement UpdateConstantBuffer
hyblocker Sep 23, 2024
68acdda
(feat): Create texture sampler
hyblocker Sep 23, 2024
afaa119
(feat): Implement texture loading
hyblocker Sep 23, 2024
adaf51f
(feat): Implement geometry submission
hyblocker Sep 23, 2024
8eb491b
(fix): Correct invalid input layout
hyblocker Sep 23, 2024
05e01bf
(fix): Correct incorrect rasterizer state
hyblocker Sep 23, 2024
e5bd71e
(fix): Set initial state every frame
hyblocker Sep 23, 2024
6a34452
Merge branch 'mikke89:master' into dx11-backend
hyblocker Sep 23, 2024
fc02417
(fix): Disable sRGB for consistency with GL3
hyblocker Sep 24, 2024
6742db4
(feat): Use a hashmap to store GPU resources
hyblocker Sep 24, 2024
a034b5d
(fix): Remove texture cache, release texture after generating texture…
hyblocker Sep 25, 2024
cc45636
(fix): Change swapchain swap effect to flip discard
hyblocker Sep 25, 2024
d85c76e
(fix): Correct typo in swapchain_occluded
hyblocker Sep 25, 2024
b57d1d9
(feat): Add depth stencil state
hyblocker Sep 25, 2024
4d2cc40
(fix): Add default blend factor to blend state
hyblocker Sep 25, 2024
7591ce2
(feat): Backup and restore DX11 state on frame begin / end
hyblocker Sep 25, 2024
16b0120
(chore): Remove redundant struct
hyblocker Sep 25, 2024
d6dbabb
(chore): Use snake case
hyblocker Sep 25, 2024
2d578d0
(feat): Add support for window resizing
hyblocker Sep 25, 2024
0160747
(feat): Handle Aero Snap
hyblocker Sep 25, 2024
f6dbb56
(chore): Whitelist DX11 backend for effects sample
hyblocker Sep 25, 2024
aa6bbe0
(feat): Add stb_image loader
hyblocker Sep 25, 2024
b24e51a
(chore): Correct code style
hyblocker Sep 25, 2024
2d7b7a0
(feat): Implement layer system
hyblocker Sep 25, 2024
a86f001
(fix): Flip UVs for passthrough
hyblocker Sep 25, 2024
a5b16d3
(fix): Release depth stencil variants
hyblocker Sep 26, 2024
29cd4ca
(feat): Implement clip masks
hyblocker Sep 26, 2024
2def0df
(feat): Implement layer handling
hyblocker Sep 26, 2024
0d631a7
(feat): Add all shader programs
hyblocker Sep 26, 2024
be31214
(feat): Add all properties to cbuffer struct
hyblocker Sep 26, 2024
e7ad804
(fix): Correct clip masks
hyblocker Sep 26, 2024
e337ca6
(feat): Half implement layer compositing
hyblocker Sep 26, 2024
06f0946
(feat): Implement shaders
hyblocker Sep 26, 2024
2b3fa50
(chore): Snake case
hyblocker Sep 26, 2024
0966a97
(feat): Implement filters (no rendering)
hyblocker Sep 26, 2024
565a408
(fix): Convert filter rendering to D3D11
hyblocker Sep 26, 2024
4b73b90
(fix): Bind cbuffer to fragment shader
hyblocker Sep 26, 2024
35b94ec
(fix): Correct BindTexture implementation
hyblocker Sep 27, 2024
adb96d4
(chore): Snake case
hyblocker Sep 27, 2024
91262aa
(feat): Implement filters and blurring
hyblocker Sep 27, 2024
69e4460
(feat): Implement debug markers
hyblocker Sep 27, 2024
87e0611
(chore): Spaces not tabs
hyblocker Sep 27, 2024
ba0dbb5
(chore): Simplify shader structure names
hyblocker Sep 28, 2024
2768cfa
(fix): Correct blur using incorrect vertex shader
hyblocker Sep 28, 2024
50b203d
(fix): Correct typos in shaders
hyblocker Sep 28, 2024
a4a19c5
(fix): Unbind slot 1 after use
hyblocker Sep 28, 2024
40dacf8
(fix): Correct clip mask implementation
hyblocker Sep 28, 2024
7f1c779
(chore): Match comment locations with GL3
hyblocker Sep 29, 2024
cf2397b
(chore): Correct RenderGeometry having side-effects
hyblocker Sep 29, 2024
80bae72
(fix): Bind depth stencil to match GL3 behaviour
hyblocker Sep 29, 2024
cf869fc
(fix): Don't clear alpha channel
hyblocker Sep 29, 2024
04df677
(chore): Make RenderLayerStack use m_ for variables
hyblocker Sep 29, 2024
42a4082
(fix): Unbind resource views after rendering filters
hyblocker Sep 29, 2024
2d164ec
(chore): Cast bounds to float
hyblocker Sep 29, 2024
a7eb5f7
(fix): Fix debug layer incorrect marking event at wrong spot
hyblocker Sep 29, 2024
a0f5543
(fix): Mark cbuffer as dirty when altered
hyblocker Sep 29, 2024
de5755a
(chore): Handle transposing matrices?
hyblocker Sep 29, 2024
5e7207b
(feat): Begin implementing BlitRenderTarget
hyblocker Sep 29, 2024
9225739
(feat): Add temporary render target for blitting
hyblocker Sep 29, 2024
a13dcee
(chore): Assert on invalid coords for blitting
hyblocker Sep 29, 2024
ca36f57
(feat): Add a custom blit implementation
hyblocker Sep 29, 2024
baaf51f
(fix): Fix incorrect blend factor
hyblocker Sep 30, 2024
dc437f2
(fix): Correct copy to copy bounds
hyblocker Sep 30, 2024
d63230a
(fix): Why did I commit this
hyblocker Sep 30, 2024
e554916
(fix): Correct scissor being set incorrectly
hyblocker Oct 1, 2024
8188086
(fix): Correct blit shader having incorrect maths
hyblocker Oct 1, 2024
3104f37
(chore): Simplify binding render targets
hyblocker Oct 1, 2024
8538211
(fix): DrawGeometry match behaviour of GL3
hyblocker Oct 1, 2024
254636a
(fix): Simplify clip mask debug scope
hyblocker Oct 1, 2024
064577c
(chore): Remove redundant code
hyblocker Oct 1, 2024
dc6b3bc
(feat): Better blitting
hyblocker Oct 1, 2024
a8c9d36
(fix): Correct blitting
hyblocker Oct 1, 2024
9745994
(fix): Correct bad blend state
hyblocker Oct 1, 2024
974926c
(fix): Correct color matrix implementation
hyblocker Oct 1, 2024
6ca7379
(fix): Unbind resources when done
hyblocker Oct 1, 2024
911b51e
(fix): Correct binding order
hyblocker Oct 1, 2024
2b0673f
(fix): Correct alignment of blur shader
hyblocker Oct 1, 2024
6512dc9
(chore): Remove a lot of warnings
hyblocker Oct 1, 2024
43799ed
(fix): Fix color matrix flickering
hyblocker Oct 3, 2024
9b86546
(fix): Remove padding from cbuffers in shaders
hyblocker Oct 3, 2024
9651a95
(fix): Correct bind order for MaskImage
hyblocker Oct 3, 2024
6bb871e
(fix): Fix unnamed struct warning
hyblocker Oct 3, 2024
ada1c82
(fix): Fix colour blending
hyblocker Oct 3, 2024
48324d0
(feat): Get blur to render something?
hyblocker Oct 3, 2024
82dfb0f
(fix): Fix memory leak
hyblocker Oct 4, 2024
b839bff
(fix): Fix blur flipping image on large kernels
hyblocker Oct 4, 2024
19ddcb3
(fix): Correct blur implementation
hyblocker Oct 5, 2024
1e83f4a
(fix): Cleanup some DX11 resources which were being leaked
hyblocker Oct 5, 2024
aa44456
(fix): Improve blur implementation to correct UV offset
hyblocker Oct 5, 2024
1dfd0c9
(feat): Add early exit cases for blurring to GL3
hyblocker Oct 5, 2024
be849b8
(fix): Blurring on specific kernels is incorrect
hyblocker Oct 6, 2024
6249f87
(chore): Remove redundant name from type
hyblocker Oct 6, 2024
2f7f963
(feat): Implement drop shadows
hyblocker Oct 6, 2024
353a818
(fix): Correct blur de-jitter
hyblocker Oct 6, 2024
1b8655a
(chore): Remove debug code
hyblocker Oct 6, 2024
d9a7ca3
(chore): Remove redundant parameter for BeginFrame
hyblocker Oct 6, 2024
8a5e50f
(feat): Add GLFW backend
hyblocker Oct 29, 2024
6ae5aba
Merge branch 'mikke89:master' into dx11-backend
hyblocker Oct 29, 2024
8ed4753
(chore): Add DirectX11 to README
hyblocker Oct 29, 2024
14534e2
(fix): Improve MSAA sampling pattern
hyblocker Nov 2, 2024
6c57849
(fix): Remove m_geometry_cache
hyblocker Nov 2, 2024
8c1d982
(fix): Move stb_image sample to backend.
hyblocker Nov 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Backends/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ target_sources(rmlui_backend_Win32_VK INTERFACE
)
target_link_libraries(rmlui_backend_Win32_VK INTERFACE rmlui_backend_common_headers)

add_library(rmlui_backend_Win32_DX11 INTERFACE)
target_sources(rmlui_backend_Win32_DX11 INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Platform_Win32.cpp"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Renderer_DX11.cpp"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Backend_Win32_DX11.cpp"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Platform_Win32.h"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Renderer_DX11.h"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Include_Windows.h"
)
target_link_libraries(rmlui_backend_Win32_DX11 INTERFACE rmlui_backend_common_headers d3d11.lib dxgi.lib d3dcompiler.lib)

add_library(rmlui_backend_X11_GL2 INTERFACE)
target_sources(rmlui_backend_X11_GL2 INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Platform_X11.cpp"
Expand Down Expand Up @@ -146,6 +157,17 @@ if(UNIX)
target_link_libraries(rmlui_backend_GLFW_GL3 INTERFACE ${CMAKE_DL_LIBS})
endif()

add_library(rmlui_backend_GLFW_DX11 INTERFACE)
target_sources(rmlui_backend_GLFW_DX11 INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Platform_GLFW.cpp"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Renderer_DX11.cpp"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Backend_GLFW_DX11.cpp"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Platform_GLFW.h"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Renderer_DX11.h"
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Include_Windows.h"
)
target_link_libraries(rmlui_backend_GLFW_DX11 INTERFACE rmlui_backend_common_headers d3d11.lib dxgi.lib d3dcompiler.lib glfw)

add_library(rmlui_backend_GLFW_VK INTERFACE)
target_sources(rmlui_backend_GLFW_VK INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/RmlUi_Platform_GLFW.cpp"
Expand Down
Loading