Blackcomb  prealpha
Engine-ish
Static Public Member Functions | List of all members
blackcomb::imgui::Wrapper Class Reference

A conveniece wrapper for Dear ImGui's initialization and destruction. More...

#include <Wrapper.h>

Static Public Member Functions

static void createContext ()
 Creates the ImGui context. More...
 
static void simpleConfig ()
 Sets up a simple, workable default configuration if you don't want to bother with it yourself. More...
 
static void initialize (GLFWwindow *windowPtr, const char *glslVersion=nullptr, bool installCallbacks=true)
 Initialize the ImGui context and bindings. More...
 
static void beginFrame ()
 Should be called each frame you are drawing an imgui object, before rendering anything. More...
 
static void render ()
 Should be called when you are done drawing all of your ImGui objects. More...
 
static void destroy ()
 Should be called when you are done with ImGui, probably in AppBase::destroy.
 

Detailed Description

A conveniece wrapper for Dear ImGui's initialization and destruction.

For additional documentation on Dear ImGui, see https://github.com/ocornut/imgui/wiki.

Member Function Documentation

◆ beginFrame()

void blackcomb::imgui::Wrapper::beginFrame ( )
static

Should be called each frame you are drawing an imgui object, before rendering anything.

Informs ImGui that a new frame has begun.

◆ createContext()

void blackcomb::imgui::Wrapper::createContext ( )
static

Creates the ImGui context.

Call this before any other ImGui function!

◆ initialize()

void blackcomb::imgui::Wrapper::initialize ( GLFWwindow *  windowPtr,
const char *  glslVersion = nullptr,
bool  installCallbacks = true 
)
static

Initialize the ImGui context and bindings.

Call after createContext and after configuring ImGui

Parameters
windowPtrThe handle of the window to draw to
glslVersionThe GLSL version, defined as in a shader file (ie. "#version 150"), or nullptr for imgui's default.
installCallbacksWhether or not imgui should register its callbacks with OpenGL.

◆ render()

void blackcomb::imgui::Wrapper::render ( )
static

Should be called when you are done drawing all of your ImGui objects.

Draws the UI to the screen.

◆ simpleConfig()

void blackcomb::imgui::Wrapper::simpleConfig ( )
static

Sets up a simple, workable default configuration if you don't want to bother with it yourself.

Enables viewports (you can remove UI panels from the window), docking (tabs/tiling), and the dark theme.


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