TachyonUI
1.1.0
High-performance UI for building tools.
Toggle main menu visibility
Loading...
Searching...
No Matches
d3d12_common.h
Go to the documentation of this file.
1
#pragma once
2
3
// Inside the Direct3D 12 backend only: the Windows and D3D12 headers, without their macros
4
// leaking into the library's names (CreateWindow, min and max).
5
6
#ifndef WIN32_LEAN_AND_MEAN
7
#define WIN32_LEAN_AND_MEAN
8
#endif
9
#ifndef NOMINMAX
10
#define NOMINMAX
11
#endif
12
#include <windows.h>
13
#undef CreateWindow
14
15
#include <d3d12.h>
16
#include <dxgi1_6.h>
17
#include <wrl/client.h>
18
19
#include <string>
20
21
namespace
tachyon::d3d12
22
{
23
using
Microsoft::WRL::ComPtr;
24
26
inline
constexpr
DXGI_FORMAT
kDrawFormat
= DXGI_FORMAT_B8G8R8A8_UNORM;
27
inline
constexpr
DXGI_FORMAT
kDepthFormat
= DXGI_FORMAT_D32_FLOAT;
28
30
std::string
HResultText
(HRESULT hr);
31
33
std::string
FromWide
(
const
wchar_t
* text);
34
}
tachyon::d3d12
Definition
d3d12_common.h:22
tachyon::d3d12::kDrawFormat
constexpr DXGI_FORMAT kDrawFormat
What a window frame draws into, as on Vulkan: 8-bit BGRA, and 32-bit float depth.
Definition
d3d12_common.h:26
tachyon::d3d12::HResultText
std::string HResultText(HRESULT hr)
A failed call's HRESULT as text, for errors and logs ("0x887A0005").
tachyon::d3d12::FromWide
std::string FromWide(const wchar_t *text)
UTF-16 from Windows (an adapter's name) as UTF-8.
tachyon::d3d12::kDepthFormat
constexpr DXGI_FORMAT kDepthFormat
Definition
d3d12_common.h:27
gui_core
graphics
d3d12
d3d12_common.h
Generated by
1.18.0