Unravel Engine C++ Reference
Loading...
Searching...
No Matches
imgui.cpp File Reference
#include "imgui.h"
#include "backend/imgui_impl_ospp.h"
#include <bgfx/embedded_shader.h>
#include <bx/allocator.h>
#include <bx/math.h>
#include <bx/timer.h>
#include <graphics/utils/bgfx_utils.h>
#include <imgui/imgui.h>
#include <imgui/imgui_internal.h>
#include <set>
#include <cstdint>
#include "graphics/graphics.h"
#include "shaders/fs_imgui_image.bin.h"
#include "shaders/fs_ocornut_imgui.bin.h"
#include "shaders/vs_imgui_image.bin.h"
#include "shaders/vs_ocornut_imgui.bin.h"
#include "fonts/icons/icons_material_design_icons.ttf.h"
#include "fonts/roboto/roboto_regular.ttf.h"
#include "fonts/roboto/robotomono_regular.ttf.h"
#include "fonts/inter/inter_thin.ttf.h"
#include "fonts/inter/inter_light.ttf.h"
#include "fonts/inter/inter_extra_light.ttf.h"
#include "fonts/inter/inter_regular.ttf.h"
#include "fonts/inter/inter_medium.ttf.h"
#include "fonts/inter/inter_semi_bold.ttf.h"
#include "fonts/inter/inter_bold.ttf.h"
#include "fonts/inter/inter_extra_bold.ttf.h"
#include "fonts/inter/inter_black.ttf.h"
#include <engine/engine.h>
#include <engine/assets/asset_manager.h>
#include <graphics/shader.h>

Go to the source code of this file.

Classes

struct  FontRangeMerge
 
struct  OcornutImguiContext
 

Namespaces

namespace  ImGui
 

Functions

static void * memAlloc (size_t _size, void *_userData)
 
static void memFree (void *_ptr, void *_userData)
 
static void ImGui_ImplGFX_DestroyTexture (ImTextureData *tex)
 
void ImGui_ImplGFX_UpdateTexture (ImTextureData *tex)
 
void imguiCreate (unravel::render_window *window, float _fontSize, bx::AllocatorI *_allocator)
 
void imguiCreateCubemapProgram ()
 
void imguiDestroy ()
 
void imguiProcessEvent (os::event &e)
 
void imguiBeginFrame (float dt)
 
void imguiEndFrame (gfx::view_id id)
 
void ImGui::PushFont (Font::Enum _font)
 
ImFont * ImGui::GetFont (Font::Enum _font)
 
void ImGui::PushEnabled (bool _enabled)
 
void ImGui::PopEnabled ()
 
bool ImGui::IsReadonly ()
 
void ImGui::PushReadonly (bool _enabled)
 
void ImGui::PopReadonly ()
 
void ImGui::PushWindowFontSize (int size)
 
void ImGui::PopWindowFontSize ()
 
void ImGui::PushWindowFontScale (float scale)
 
void ImGui::PopWindowFontScale ()
 
uint64_t ImGui::GetDrawCalls ()
 
void ImGui::KeepAliveOneFrame (const gfx::texture::ptr &tex)
 

Variables

static const gfx::embedded_shader s_embeddedShaders []
 
static FontRangeMerge s_fontRangeMerge []
 
static OcornutImguiContext s_ctx
 

Function Documentation

◆ ImGui_ImplGFX_DestroyTexture()

static void ImGui_ImplGFX_DestroyTexture ( ImTextureData * tex)
static

Definition at line 68 of file imgui.cpp.

◆ ImGui_ImplGFX_UpdateTexture()

void ImGui_ImplGFX_UpdateTexture ( ImTextureData * tex)

Definition at line 80 of file imgui.cpp.

◆ imguiBeginFrame()

void imguiBeginFrame ( float dt)

Definition at line 632 of file imgui.cpp.

◆ imguiCreate()

void imguiCreate ( unravel::render_window * window,
float _fontSize,
bx::AllocatorI * _allocator )

Definition at line 612 of file imgui.cpp.

◆ imguiCreateCubemapProgram()

void imguiCreateCubemapProgram ( )

Definition at line 617 of file imgui.cpp.

◆ imguiDestroy()

void imguiDestroy ( )

Definition at line 622 of file imgui.cpp.

◆ imguiEndFrame()

void imguiEndFrame ( gfx::view_id id)

Definition at line 638 of file imgui.cpp.

◆ imguiProcessEvent()

void imguiProcessEvent ( os::event & e)

Definition at line 627 of file imgui.cpp.

◆ memAlloc()

static void * memAlloc ( size_t _size,
void * _userData )
static

Definition at line 600 of file imgui.cpp.

◆ memFree()

static void memFree ( void * _ptr,
void * _userData )
static

Definition at line 606 of file imgui.cpp.

Variable Documentation

◆ s_ctx

OcornutImguiContext s_ctx
static

Definition at line 598 of file imgui.cpp.

◆ s_embeddedShaders

const gfx::embedded_shader s_embeddedShaders[]
static
Initial value:
= {BGFX_EMBEDDED_SHADER(vs_ocornut_imgui),
BGFX_EMBEDDED_SHADER(fs_ocornut_imgui),
BGFX_EMBEDDED_SHADER(vs_imgui_image),
BGFX_EMBEDDED_SHADER(fs_imgui_image),
BGFX_EMBEDDED_SHADER_END()}

Definition at line 45 of file imgui.cpp.

◆ s_fontRangeMerge

FontRangeMerge s_fontRangeMerge[]
static
Initial value:
= {
{"MaterialDesignIcons", s_iconsMaterialDesignIconsTtf, sizeof(s_iconsMaterialDesignIconsTtf), {ICON_MIN_MDI, ICON_MAX_MDI, 0}},
}
#define ICON_MIN_MDI
#define ICON_MAX_MDI

Definition at line 60 of file imgui.cpp.