Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <imgui_manager.h>
Public Member Functions | |
ImGuiManager () | |
~ImGuiManager () | |
void | Init () |
void | NewFrame () |
void | Render () |
void | Shutdown () |
Static Public Member Functions | |
static void | ImGuiRenderDrawLists (ImDrawData *draw_data) |
Protected Member Functions | |
void | CreateDeviceObjects () |
void | InvalidateDeviceObjects () |
Private Attributes | |
bool | initialized_ |
INT64 | ticks_per_second_ |
INT64 | time_ |
ID3DBlob * | vertex_shader_blob_ |
D3D12_SHADER_BYTECODE | vertex_shader_ |
ID3DBlob * | pixel_shader_blob_ |
D3D12_SHADER_BYTECODE | pixel_shader_ |
GraphicsPSO | pipeline_state_ |
RootSignature | root_signature_ |
ColorBuffer | texture_buffer_ |
UploadBuffer | upload_buffer_ |
Implements all ImGui functionality.
This is the custom implementation for ImGui in Blowbox, because all implementations that were online for imgui were quite bad, so I implemented it myself. It wraps all setup, rendering and shutdown for managing ImGui.
blowbox::ImGuiManager::ImGuiManager | ( | ) |
Constructs the ImGuiManager.
blowbox::ImGuiManager::~ImGuiManager | ( | ) |
Destructs the ImGuiManager.
|
protected |
Creates all device objects (shaders, pso, root signature, etc)
|
static |
Renders all the ImGui data to the screen.
[in] | draw_data | The data that is provided by ImGui. |
void blowbox::ImGuiManager::Init | ( | ) |
Initializes the ImGuiManager.
|
protected |
Destroys all device objects (shaders, pso, root signature, etc)
void blowbox::ImGuiManager::NewFrame | ( | ) |
Prepares ImGui for a new frame.
void blowbox::ImGuiManager::Render | ( | ) |
Performs the actual rendering for ImGui.
void blowbox::ImGuiManager::Shutdown | ( | ) |
Shuts down the ImGuiManager.
|
private |
Whether the ImGuiManager has been initialized.
|
private |
The PSO for imgui rendering.
|
private |
The pixel shader for imgui.
|
private |
The pixel shader blob for imgui.
|
private |
The rootsignature for imgui rendering.
|
private |
The buffer for all texture data provided by imgui.
|
private |
Ticks per second (queried by QueryPerformanceFrequency)
|
private |
Current time (queried by QueryPerformanceCounter)
|
private |
One large buffer for storing all vertex, index, constant buffer, etc. data.
|
private |
The vertex shader for imgui.
|
private |
The vertex shader blob for imgui.