Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
graphicseditor.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
11
//------------------------------------------------------------------------------
12
#if WITH_NEBULA_EDITOR
13
#include "
game/entity.h
"
14
#include "
game/world.h
"
15
#include "
graphics/graphicsentity.h
"
16
#include "
graphics/view.h
"
17
#include "imgui.h"
18
#include "
math/bbox.h
"
19
#include "
math/mat4.h
"
20
#include "
math/vec2.h
"
21
#include "
math/vec3.h
"
22
#include "
math/vec4.h
"
23
#include "neweditor/panels/viewportpanel.h"
24
25
namespace
GraphicsFeature
26
{
27
28
//------------------------------------------------------------------------------
50
//------------------------------------------------------------------------------
51
class
GraphicsViewportPanel final :
public
Editor::ViewportPanel
52
{
53
__DeclareClass
(GraphicsViewportPanel)
54
public
:
55
GraphicsViewportPanel();
56
virtual
~GraphicsViewportPanel();
57
60
static
Graphics::GraphicsEntityId GetViewportLight();
62
static
Graphics::GraphicsEntityId GetViewportCamera();
65
static
bool
ShowsFullPipeline();
66
67
protected
:
68
bool
OnSetup()
override
;
69
70
ImTextureID OnTarget(
int
width,
int
height)
override
;
71
void
OnRender(
const
Math::mat4& view,
const
Math::mat4& projection)
override
;
72
void
OnLockMouse(
bool
locked)
override
;
73
void
OnWarpMouse(
const
Math::vec2& pos)
override
;
74
Math::vec2 OnMouseDelta()
const override
;
75
void
OnCanvasClosed()
override
;
76
77
private
:
79
Graphics::ViewId view;
80
82
Graphics::GraphicsEntityId camera;
83
86
Graphics::GraphicsEntityId directionalLight;
87
89
ImTextureID textureId;
90
92
int
scriptWidth;
93
int
scriptHeight;
94
96
void
ShowGameScript(
bool
show);
98
bool
showsGameScript;
99
Graphics::GraphicsEntityId gameViewCamera;
100
101
static
GraphicsViewportPanel* instance;
102
};
103
105
void
RegisterEditorContributions();
106
109
void
RegisterEditorProcessors();
111
void
ClearEditorContributions();
112
113
}
// namespace GraphicsFeature
114
#endif
// WITH_NEBULA_EDITOR
115
//------------------------------------------------------------------------------
entity.h
bbox.h
graphicsentity.h
mat4.h
GraphicsFeature
Definition
graphicsfeatureunit.cc:66
__DeclareClass
#define __DeclareClass(type)
vec2.h
vec3.h
vec4.h
view.h
world.h
code
addons
graphicsfeature
editor
graphicseditor.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.