Files
LNXRNT/Kinc/Backends/Graphics5/Direct3D12/Sources/kinc/backend/graphics5/d3d12mini.h
2025-01-29 10:55:49 +01:00

57 lines
933 B
C

#pragma once
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
struct ID3D12CommandAllocator;
struct ID3D12GraphicsCommandList;
struct ID3D12Fence;
struct ID3D12Resource;
struct ID3D12DescriptorHeap;
struct IDXGISwapChain;
typedef void *HANDLE;
typedef unsigned __int64 UINT64;
struct D3D12Viewport {
float TopLeftX;
float TopLeftY;
float Width;
float Height;
float MinDepth;
float MaxDepth;
};
struct D3D12Rect {
long left;
long top;
long right;
long bottom;
};
#define QUEUE_SLOT_COUNT 2
struct dx_window {
#ifndef KORE_DIRECT3D_HAS_NO_SWAPCHAIN
struct IDXGISwapChain *swapChain;
#endif
UINT64 current_fence_value;
UINT64 fence_values[QUEUE_SLOT_COUNT];
HANDLE frame_fence_events[QUEUE_SLOT_COUNT];
struct ID3D12Fence *frame_fences[QUEUE_SLOT_COUNT];
int width;
int height;
int new_width;
int new_height;
int current_backbuffer;
bool vsync;
int window_index;
};
#ifdef __cplusplus
}
#endif