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
35
37{
39public:
43 virtual ~ImguiContext();
44
46 static void Create();
48 static void Discard();
49
51 static void SetRectSize(SizeT width, SizeT height);
52
54 static bool HandleInput(const Input::InputEvent& event);
56 static void ResetKeyDownState();
57
59 static void OnWindowResized(const CoreGraphics::WindowId windowId, SizeT width, SizeT height);
61 static void NewFrame(const Graphics::FrameContext& ctx);
62
97
98private:
99 static void RecoverImGuiContextErrors();
100};
101
102} // namespace Dynui
Definition imguicontext.h:37
static void ResetKeyDownState()
reset key events
Definition imguicontext.cc:842
static void OnWindowResized(const CoreGraphics::WindowId windowId, SizeT width, SizeT height)
called if the window size has changed
Definition imguicontext.cc:857
static void Create()
Create context.
Definition imguicontext.cc:334
virtual ~ImguiContext()
destructor
Definition imguicontext.cc:325
static void NewFrame(const Graphics::FrameContext &ctx)
called before frame
Definition imguicontext.cc:867
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:317
static bool HandleInput(const Input::InputEvent &event)
handle event
Definition imguicontext.cc:790
static ImguiState state
Definition imguicontext.h:96
static void Discard()
Discard context.
Definition imguicontext.cc:620
static void RecoverImGuiContextErrors()
Definition imguicontext.cc:241
Definition graphicscontext.h:165
The input events of the Input subsystems.
Definition inputevent.h:24
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 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:64
ImFont * itFont
Definition imguicontext.h:91
ImguiTextureId fontTexture
Definition imguicontext.h:73
ImFont * smallFont
Definition imguicontext.h:89
CoreGraphics::PipelineId pipeline
Definition imguicontext.h:67
CoreGraphics::ShaderId uiShader
Definition imguicontext.h:65
Util::FixedArray< byte * > indexPtrs
Definition imguicontext.h:86
CoreGraphics::ShaderProgramId prog
Definition imguicontext.h:66
CoreGraphics::VertexLayoutId vlo
Definition imguicontext.h:78
Util::FixedArray< CoreGraphics::BufferId > vbos
Definition imguicontext.h:76
Util::FixedArray< CoreGraphics::BufferId > ibos
Definition imguicontext.h:77
IndexT textProjectionConstant
Definition imguicontext.h:80
Ptr< ImguiInputHandler > inputHandler
Definition imguicontext.h:93
ImFont * boldFont
Definition imguicontext.h:90
ImFont * normalFont
Definition imguicontext.h:88
Util::FixedArray< byte * > vertexPtrs
Definition imguicontext.h:85
bool dockOverViewport
Definition imguicontext.h:94
CoreGraphics::ResourceTableId resourceTable
Definition imguicontext.h:82
IndexT packedTextureInfo
Definition imguicontext.h:81
Definition imguicontext.h:29
CoreGraphics::TextureId nebulaHandle
Definition imguicontext.h:30
uint mip
Definition imguicontext.h:32
uint useAlpha
Definition imguicontext.h:33
uint layer
Definition imguicontext.h:31
Definition graphicsserver.h:31
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31
int IndexT
Definition types.h:48