Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
blowbox::ImGuiManager Class Reference

#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_
 

Detailed Description

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.

Constructor & Destructor Documentation

blowbox::ImGuiManager::ImGuiManager ( )

Constructs the ImGuiManager.

blowbox::ImGuiManager::~ImGuiManager ( )

Destructs the ImGuiManager.

Member Function Documentation

void blowbox::ImGuiManager::CreateDeviceObjects ( )
protected

Creates all device objects (shaders, pso, root signature, etc)

void blowbox::ImGuiManager::ImGuiRenderDrawLists ( ImDrawData *  draw_data)
static

Renders all the ImGui data to the screen.

Parameters
[in]draw_dataThe data that is provided by ImGui.
void blowbox::ImGuiManager::Init ( )

Initializes the ImGuiManager.

void blowbox::ImGuiManager::InvalidateDeviceObjects ( )
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.

Member Data Documentation

bool blowbox::ImGuiManager::initialized_
private

Whether the ImGuiManager has been initialized.

GraphicsPSO blowbox::ImGuiManager::pipeline_state_
private

The PSO for imgui rendering.

D3D12_SHADER_BYTECODE blowbox::ImGuiManager::pixel_shader_
private

The pixel shader for imgui.

ID3DBlob* blowbox::ImGuiManager::pixel_shader_blob_
private

The pixel shader blob for imgui.

RootSignature blowbox::ImGuiManager::root_signature_
private

The rootsignature for imgui rendering.

ColorBuffer blowbox::ImGuiManager::texture_buffer_
private

The buffer for all texture data provided by imgui.

INT64 blowbox::ImGuiManager::ticks_per_second_
private

Ticks per second (queried by QueryPerformanceFrequency)

INT64 blowbox::ImGuiManager::time_
private

Current time (queried by QueryPerformanceCounter)

UploadBuffer blowbox::ImGuiManager::upload_buffer_
private

One large buffer for storing all vertex, index, constant buffer, etc. data.

D3D12_SHADER_BYTECODE blowbox::ImGuiManager::vertex_shader_
private

The vertex shader for imgui.

ID3DBlob* blowbox::ImGuiManager::vertex_shader_blob_
private

The vertex shader blob for imgui.


The documentation for this class was generated from the following files: