Nebula
Loading...
Searching...
No Matches
imguicontext.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11//------------------------------------------------------------------------------
13#include "coregraphics/buffer.h"
15#include "input/inputevent.h"
19#include "imguiinputhandler.h"
21#include "frame/framecode.h"
22
23struct ImDrawData;
24struct ImFont;
25namespace Dynui
26{
27
33
40
42{
44public:
48 virtual ~ImguiContext();
49
51 static void Create();
53 static void Discard();
54
56 static void SetRectSize(SizeT width, SizeT height);
57
59 static bool HandleInput(const Input::InputEvent& event);
60
62 static void OnWindowResized(const CoreGraphics::WindowId windowId, SizeT width, SizeT height);
64 static void NewFrame(const Graphics::FrameContext& ctx);
66 static void Render(const Graphics::FrameContext& ctx);
67
102
103private:
104 static void ImguiDrawFunction(const CoreGraphics::CmdBufferId cmdBuf);
105 static void RecoverImGuiContextErrors();
106};
107
108} // namespace Dynui
Definition imguicontext.h:42
static void Render(const Graphics::FrameContext &ctx)
called before frame
Definition imguicontext.cc:691
static void OnWindowResized(const CoreGraphics::WindowId windowId, SizeT width, SizeT height)
called if the window size has changed
Definition imguicontext.cc:664
static void Create()
Create context.
Definition imguicontext.cc:315
virtual ~ImguiContext()
destructor
Definition imguicontext.cc:306
static void NewFrame(const Graphics::FrameContext &ctx)
called before frame
Definition imguicontext.cc:674
static void ImguiDrawFunction(const CoreGraphics::CmdBufferId cmdBuf)
Imgui rendering function.
Definition imguicontext.cc:36
static void SetRectSize(SizeT width, SizeT height)
set the screen dimensions to use when rendering the UI (all vertices will be mapped to these values)
ImguiContext()
constructor
Definition imguicontext.cc:298
static bool HandleInput(const Input::InputEvent &event)
handle event
Definition imguicontext.cc:612
static ImguiState state
Definition imguicontext.h:101
static void Discard()
Discard context.
Definition imguicontext.cc:584
static void RecoverImGuiContextErrors()
Definition imguicontext.cc:222
Definition framecode.h:15
Definition graphicscontext.h:165
The input events of the Input subsystems.
Definition inputevent.h:24
Allocates memory in chunks.
Definition arenaallocator.h:36
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
Imgui Profiler UI.
Definition imguiconsole.cc:277
A resource table declares a list of resources (ResourceTable in DX12, DescriptorSet in Vulkan)
Definition commandbuffer.h:148
Definition pipeline.h:16
Definition resourcetable.h:95
Definition shader.h:51
texture type
Definition texture.h:25
Definition vertexlayout.h:16
Definition window.h:25
Definition imguicontext.h:69
ImFont * itFont
Definition imguicontext.h:94
ImguiTextureId fontTexture
Definition imguicontext.h:75
IndexT textureConstant
Definition imguicontext.h:82
ImFont * smallFont
Definition imguicontext.h:92
CoreGraphics::PipelineId pipeline
Definition imguicontext.h:73
Memory::ArenaAllocator< sizeof(Frame::FrameCode)> frameOpAllocator
Definition imguicontext.h:96
CoreGraphics::ShaderId uiShader
Definition imguicontext.h:71
Util::FixedArray< byte * > indexPtrs
Definition imguicontext.h:89
CoreGraphics::ShaderProgramId prog
Definition imguicontext.h:72
CoreGraphics::VertexLayoutId vlo
Definition imguicontext.h:80
Util::FixedArray< CoreGraphics::BufferId > vbos
Definition imguicontext.h:78
ImguiRendererParams params
Definition imguicontext.h:70
Util::FixedArray< CoreGraphics::BufferId > ibos
Definition imguicontext.h:79
IndexT textProjectionConstant
Definition imguicontext.h:83
Ptr< ImguiInputHandler > inputHandler
Definition imguicontext.h:98
ImFont * boldFont
Definition imguicontext.h:93
ImFont * normalFont
Definition imguicontext.h:91
Util::FixedArray< byte * > vertexPtrs
Definition imguicontext.h:88
bool dockOverViewport
Definition imguicontext.h:99
CoreGraphics::ResourceTableId resourceTable
Definition imguicontext.h:85
IndexT packedTextureInfo
Definition imguicontext.h:84
Definition imguicontext.h:29
IndexT fontVar
Definition imguicontext.h:31
IndexT projVar
Definition imguicontext.h:30
Definition imguicontext.h:35
CoreGraphics::TextureId nebulaHandle
Definition imguicontext.h:36
uint8 mip
Definition imguicontext.h:38
uint8 layer
Definition imguicontext.h:37
Definition graphicsserver.h:33
uint8_t uint8
Definition types.h:42
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48