aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorftphikari <ftphikari@gmail.com>2023-07-13 02:11:46 +0300
committerftphikari <ftphikari@gmail.com>2023-07-13 02:11:46 +0300
commitb6baee5f776790c3335babb99fc47b8a94ba24b1 (patch)
treead515c3c8bd47c911cefb1ce3c8256b7d28f7e68
parent24c3ec235ac4eb44d4fdfa643195f70dd992f390 (diff)
[vendor:directx/dxgi] Added `GetDebugInterface`
-rw-r--r--vendor/directx/dxgi/dxgidebug.odin18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/directx/dxgi/dxgidebug.odin b/vendor/directx/dxgi/dxgidebug.odin
index 1dea396a7..636fd76d5 100644
--- a/vendor/directx/dxgi/dxgidebug.odin
+++ b/vendor/directx/dxgi/dxgidebug.odin
@@ -139,3 +139,21 @@ IDebug1_VTable :: struct {
DisableLeakTrackingForThread: proc "stdcall" (this: ^IDebug1),
IsLeakTrackingEnabledForThread: proc "stdcall" (this: ^IDebug1) -> BOOL,
}
+
+
+GetDebugInterface: proc "stdcall" (riid: ^IID, ppDebug: ^rawptr) -> HRESULT
+// Call this to start using GetDebugInterface
+debug_interface_init :: proc() -> bool {
+ debug_lib := win32.LoadLibraryW(win32.L("dxgidebug.dll"))
+ if debug_lib == nil {
+ return false
+ }
+
+ ptr := win32.GetProcAddress(debug_lib, "DXGIGetDebugInterface")
+ if ptr == nil {
+ return false
+ }
+
+ GetDebugInterface = auto_cast(ptr)
+ return true
+}