Cogs.Core
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Cogs::Core::ImguiRenderer Class Reference

Public Member Functions

bool initialize (Context *context)
 
void cleanup ()
 
ImGuiContext * createGuiContext ()
 
void deleteGuiContext (ImGuiContext *guiContext)
 
void frame (ImGuiContext *guiContext, ViewContext &view, bool updateio=true)
 
void style ()
 
void render ()
 
void addTextToGlyphBuilder (const char *text)
 
void addRangeToGlyphBuilder (const ImWchar *ranges)
 
ImVector< ImWchar > getLoadedRanges ()
 

Static Public Member Functions

static bool isUsingMouse ()
 Tests whether any ImGui control is being interacted with, or if the mouse is over an ImGui window or control.
 
static bool isUsingKeyboard ()
 Tests whether any ImGui control is currently accepting text input.
 
static void setClipboardCallbacks (GetClipboardTextFn getter, SetClipboardTextFn setter)
 

Public Attributes

GuiFontRegistry fontRegistry
 

Private Member Functions

bool createResources ()
 
void createSampler ()
 
void updateConstantBuffer (IContext *deviceContext, uint32_t mode)
 

Private Attributes

Contextcontext = nullptr
 
IGraphicsDevicedevice = nullptr
 
VertexBufferHandle vertexBuffer
 
IndexBufferHandle indexBuffer
 
Cogs::BufferHandle constantBuffer
 
Cogs::EffectHandle effect
 
InputLayoutHandle inputLayout
 
VertexFormatHandle format
 
SamplerStateHandle sampler
 
BlendStateHandle blendState
 
RasterizerStateHandle rasterizerState
 
DepthStencilStateHandle depthState
 
Timer timer
 
ImGuiContext * imguiContext = nullptr
 
ImFontGlyphRangesBuilder fontGlyphBuilder
 
ImVector< ImWchar > loadedRanges
 
bool updateLoadedRanges = false
 
uint32_t mode = GUI_MODE_DEFAULT
 
int vertexBufferSize = 5000
 
int indexBufferSize = 10000
 
bool touchPointerHeld = false
 
glm::uvec2 touchPointerPosition { 0,0 }
 

Static Private Attributes

static GetClipboardTextFn getClipboardTextFn = nullptr
 
static SetClipboardTextFn setClipboardTextFn = nullptr
 

Detailed Description

Definition at line 66 of file ImguiRenderer.h.

Member Function Documentation

◆ addRangeToGlyphBuilder()

void Cogs::Core::ImguiRenderer::addRangeToGlyphBuilder ( const ImWchar *  ranges)

Definition at line 627 of file ImguiRenderer.cpp.

◆ addTextToGlyphBuilder()

void Cogs::Core::ImguiRenderer::addTextToGlyphBuilder ( const char *  text)

Definition at line 619 of file ImguiRenderer.cpp.

◆ cleanup()

void Cogs::Core::ImguiRenderer::cleanup ( )

Definition at line 177 of file ImguiRenderer.cpp.

◆ createGuiContext()

ImGuiContext * Cogs::Core::ImguiRenderer::createGuiContext ( )

Definition at line 194 of file ImguiRenderer.cpp.

◆ createResources()

bool Cogs::Core::ImguiRenderer::createResources ( )
private

Definition at line 702 of file ImguiRenderer.cpp.

◆ createSampler()

void Cogs::Core::ImguiRenderer::createSampler ( )
private

Definition at line 693 of file ImguiRenderer.cpp.

◆ deleteGuiContext()

void Cogs::Core::ImguiRenderer::deleteGuiContext ( ImGuiContext *  guiContext)

Definition at line 219 of file ImguiRenderer.cpp.

◆ frame()

void Cogs::Core::ImguiRenderer::frame ( ImGuiContext *  guiContext,
ViewContext view,
bool  updateio = true 
)

Definition at line 354 of file ImguiRenderer.cpp.

◆ getLoadedRanges()

ImVector< ImWchar > Cogs::Core::ImguiRenderer::getLoadedRanges ( )
inline

Definition at line 96 of file ImguiRenderer.h.

◆ initialize()

bool Cogs::Core::ImguiRenderer::initialize ( Context context)

Definition at line 138 of file ImguiRenderer.cpp.

◆ isUsingKeyboard()

bool Cogs::Core::ImguiRenderer::isUsingKeyboard ( )
static

Tests whether any ImGui control is currently accepting text input.

If this function returns true, the calling application should not process key input for non-UI purposes.

If this function returns true, the calling application should not process key input for non-UI purposes. *============================================================================================

Definition at line 247 of file ImguiRenderer.cpp.

◆ isUsingMouse()

bool Cogs::Core::ImguiRenderer::isUsingMouse ( )
static

Tests whether any ImGui control is being interacted with, or if the mouse is over an ImGui window or control.

If this function returns true, do not use the mouse for application input.

If this function returns true, do not use the mouse for application input. *============================================================================================

Definition at line 234 of file ImguiRenderer.cpp.

◆ render()

void Cogs::Core::ImguiRenderer::render ( )

Definition at line 439 of file ImguiRenderer.cpp.

◆ setClipboardCallbacks()

void Cogs::Core::ImguiRenderer::setClipboardCallbacks ( GetClipboardTextFn  getter,
SetClipboardTextFn  setter 
)
static

Definition at line 256 of file ImguiRenderer.cpp.

◆ style()

void Cogs::Core::ImguiRenderer::style ( )

Definition at line 633 of file ImguiRenderer.cpp.

◆ updateConstantBuffer()

void Cogs::Core::ImguiRenderer::updateConstantBuffer ( IContext deviceContext,
uint32_t  mode 
)
private

Definition at line 278 of file ImguiRenderer.cpp.

Member Data Documentation

◆ blendState

BlendStateHandle Cogs::Core::ImguiRenderer::blendState
private

Definition at line 123 of file ImguiRenderer.h.

◆ constantBuffer

Cogs::BufferHandle Cogs::Core::ImguiRenderer::constantBuffer
private

Definition at line 114 of file ImguiRenderer.h.

◆ context

Context* Cogs::Core::ImguiRenderer::context = nullptr
private

Definition at line 108 of file ImguiRenderer.h.

◆ depthState

DepthStencilStateHandle Cogs::Core::ImguiRenderer::depthState
private

Definition at line 125 of file ImguiRenderer.h.

◆ device

IGraphicsDevice* Cogs::Core::ImguiRenderer::device = nullptr
private

Definition at line 109 of file ImguiRenderer.h.

◆ effect

Cogs::EffectHandle Cogs::Core::ImguiRenderer::effect
private

Definition at line 116 of file ImguiRenderer.h.

◆ fontGlyphBuilder

ImFontGlyphRangesBuilder Cogs::Core::ImguiRenderer::fontGlyphBuilder
private

Definition at line 131 of file ImguiRenderer.h.

◆ fontRegistry

GuiFontRegistry Cogs::Core::ImguiRenderer::fontRegistry

Definition at line 98 of file ImguiRenderer.h.

◆ format

VertexFormatHandle Cogs::Core::ImguiRenderer::format
private

Definition at line 119 of file ImguiRenderer.h.

◆ getClipboardTextFn

GetClipboardTextFn Cogs::Core::ImguiRenderer::getClipboardTextFn = nullptr
staticprivate

Definition at line 105 of file ImguiRenderer.h.

◆ imguiContext

ImGuiContext* Cogs::Core::ImguiRenderer::imguiContext = nullptr
private

Definition at line 129 of file ImguiRenderer.h.

◆ indexBuffer

IndexBufferHandle Cogs::Core::ImguiRenderer::indexBuffer
private

Definition at line 112 of file ImguiRenderer.h.

◆ indexBufferSize

int Cogs::Core::ImguiRenderer::indexBufferSize = 10000
private

Definition at line 138 of file ImguiRenderer.h.

◆ inputLayout

InputLayoutHandle Cogs::Core::ImguiRenderer::inputLayout
private

Definition at line 117 of file ImguiRenderer.h.

◆ loadedRanges

ImVector<ImWchar> Cogs::Core::ImguiRenderer::loadedRanges
private

Definition at line 132 of file ImguiRenderer.h.

◆ mode

uint32_t Cogs::Core::ImguiRenderer::mode = GUI_MODE_DEFAULT
private

Definition at line 135 of file ImguiRenderer.h.

◆ rasterizerState

RasterizerStateHandle Cogs::Core::ImguiRenderer::rasterizerState
private

Definition at line 124 of file ImguiRenderer.h.

◆ sampler

SamplerStateHandle Cogs::Core::ImguiRenderer::sampler
private

Definition at line 121 of file ImguiRenderer.h.

◆ setClipboardTextFn

SetClipboardTextFn Cogs::Core::ImguiRenderer::setClipboardTextFn = nullptr
staticprivate

Definition at line 106 of file ImguiRenderer.h.

◆ timer

Timer Cogs::Core::ImguiRenderer::timer
private

Definition at line 127 of file ImguiRenderer.h.

◆ touchPointerHeld

bool Cogs::Core::ImguiRenderer::touchPointerHeld = false
private

Definition at line 141 of file ImguiRenderer.h.

◆ touchPointerPosition

glm::uvec2 Cogs::Core::ImguiRenderer::touchPointerPosition { 0,0 }
private

Definition at line 143 of file ImguiRenderer.h.

◆ updateLoadedRanges

bool Cogs::Core::ImguiRenderer::updateLoadedRanges = false
private

Definition at line 133 of file ImguiRenderer.h.

◆ vertexBuffer

VertexBufferHandle Cogs::Core::ImguiRenderer::vertexBuffer
private

Definition at line 111 of file ImguiRenderer.h.

◆ vertexBufferSize

int Cogs::Core::ImguiRenderer::vertexBufferSize = 5000
private

Definition at line 137 of file ImguiRenderer.h.


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