Classes | Functions | Variables
dependencies/third-party/imgui/src/examples/example_win32_directx12/main.cpp File Reference
#include "imgui.h"
#include "imgui_impl_win32.h"
#include "imgui_impl_dx12.h"
#include <d3d12.h>
#include <dxgi1_4.h>
#include <tchar.h>
Include dependency graph for dependencies/third-party/imgui/src/examples/example_win32_directx12/main.cpp:

Go to the source code of this file.

Classes

struct  FrameContext
 

Functions

void CleanupDeviceD3D ()
 
void CleanupRenderTarget ()
 
bool CreateDeviceD3D (HWND hWnd)
 
void CreateRenderTarget ()
 
IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
int main (int, char **)
 
void ResizeSwapChain (HWND hWnd, int width, int height)
 
void WaitForLastSubmittedFrame ()
 
FrameContextWaitForNextFrameResources ()
 
LRESULT WINAPI WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 

Variables

static ID3D12Fence * g_fence = NULL
 
static HANDLE g_fenceEvent = NULL
 
static UINT64 g_fenceLastSignaledValue = 0
 
static FrameContext g_frameContext [NUM_FRAMES_IN_FLIGHT] = {}
 
static UINT g_frameIndex = 0
 
static HANDLE g_hSwapChainWaitableObject = NULL
 
static D3D12_CPU_DESCRIPTOR_HANDLE g_mainRenderTargetDescriptor [NUM_BACK_BUFFERS] = {}
 
static ID3D12Resource * g_mainRenderTargetResource [NUM_BACK_BUFFERS] = {}
 
static ID3D12GraphicsCommandList * g_pd3dCommandList = NULL
 
static ID3D12CommandQueue * g_pd3dCommandQueue = NULL
 
static ID3D12Device * g_pd3dDevice = NULL
 
static ID3D12DescriptorHeap * g_pd3dRtvDescHeap = NULL
 
static ID3D12DescriptorHeap * g_pd3dSrvDescHeap = NULL
 
static IDXGISwapChain3 * g_pSwapChain = NULL
 
static const int NUM_BACK_BUFFERS = 3
 
static const int NUM_FRAMES_IN_FLIGHT = 3
 

Function Documentation

◆ CleanupDeviceD3D()

void CleanupDeviceD3D ( )

◆ CleanupRenderTarget()

void CleanupRenderTarget ( )

◆ CreateDeviceD3D()

bool CreateDeviceD3D ( HWND  hWnd)

◆ CreateRenderTarget()

void CreateRenderTarget ( )

◆ ImGui_ImplWin32_WndProcHandler()

IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler ( HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 272 of file imgui_impl_win32.cpp.

◆ main()

int main ( int  ,
char **   
)

◆ ResizeSwapChain()

void ResizeSwapChain ( HWND  hWnd,
int  width,
int  height 
)

◆ WaitForLastSubmittedFrame()

void WaitForLastSubmittedFrame ( )

◆ WaitForNextFrameResources()

FrameContext * WaitForNextFrameResources ( )

◆ WndProc()

LRESULT WINAPI WndProc ( HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Variable Documentation

◆ g_fence

ID3D12Fence* g_fence = NULL
static

◆ g_fenceEvent

HANDLE g_fenceEvent = NULL
static

◆ g_fenceLastSignaledValue

UINT64 g_fenceLastSignaledValue = 0
static

◆ g_frameContext

FrameContext g_frameContext[NUM_FRAMES_IN_FLIGHT] = {}
static

◆ g_frameIndex

UINT g_frameIndex = 0
static

◆ g_hSwapChainWaitableObject

HANDLE g_hSwapChainWaitableObject = NULL
static

◆ g_mainRenderTargetDescriptor

D3D12_CPU_DESCRIPTOR_HANDLE g_mainRenderTargetDescriptor[NUM_BACK_BUFFERS] = {}
static

◆ g_mainRenderTargetResource

ID3D12Resource* g_mainRenderTargetResource[NUM_BACK_BUFFERS] = {}
static

◆ g_pd3dCommandList

ID3D12GraphicsCommandList* g_pd3dCommandList = NULL
static

◆ g_pd3dCommandQueue

ID3D12CommandQueue* g_pd3dCommandQueue = NULL
static

◆ g_pd3dDevice

ID3D12Device* g_pd3dDevice = NULL
static

◆ g_pd3dRtvDescHeap

ID3D12DescriptorHeap* g_pd3dRtvDescHeap = NULL
static

◆ g_pd3dSrvDescHeap

ID3D12DescriptorHeap* g_pd3dSrvDescHeap = NULL
static

◆ g_pSwapChain

IDXGISwapChain3* g_pSwapChain = NULL
static

◆ NUM_BACK_BUFFERS

const int NUM_BACK_BUFFERS = 3
static

◆ NUM_FRAMES_IN_FLIGHT

const int NUM_FRAMES_IN_FLIGHT = 3
static


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:03