Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
Debug
DebugRendering
Renderers
DebugTextRendererScreenSpace.h
1
// Copyright (c) 2014 eeGeo. All rights reserved.
2
3
#pragma once
4
5
#include "VectorMath.h"
6
#include "Fonts.h"
7
#include "Rendering.h"
8
#include "Streaming.h"
9
#include "DebugRendering.h"
10
#include "Text.h"
11
#include "BatchedTextAppearance.h"
12
13
#include <string>
14
#include <deque>
15
16
namespace
Eegeo
17
{
18
namespace
DebugRendering
19
{
20
namespace
Renderers
21
{
22
class
DebugTextRendererScreenSpace
:
private
Eegeo::NonCopyable
23
{
24
struct
TextInstance
25
{
26
v2
Origin;
27
v2
LocalTranslate;
28
v4
Color;
29
float
Rotate;
30
std::string Text;
31
float
Size;
32
float
Lifetime;
33
};
34
35
public
:
36
DebugTextRendererScreenSpace
(
Text::IScreenTextRenderer
& screenTextRenderer,
37
const
Fonts::FontInstance
& font,
38
const
Text::BatchedTextAppearance
& defaultTextAppearance);
39
40
~
DebugTextRendererScreenSpace
();
41
42
void
DrawText(
43
const
v2
& screenPosition,
44
const
std::string text,
45
const
float
size,
46
const
float
lifetime = 0.0f
47
);
48
49
void
DrawTransformedText(
50
const
v2
& origin,
51
const
v2
& localTranslate,
52
float
rotate,
53
const
std::string& text,
54
const
float
size,
55
const
float
lifetimeInSeconds
56
);
57
58
void
Update(
float
dt);
59
60
void
GenerateGeometry();
61
62
void
SetDepthEnabled(
const
bool
depthEnabled);
63
64
private
:
65
66
void
GenerateGeometryForSingleInstance(
const
TextInstance& data);
67
68
Text::IScreenTextRenderer
& m_screenTextRenderer;
69
70
const
Fonts::FontInstance
& m_fontInstance;
71
std::deque<TextInstance> m_drawData;
72
73
const
Text::BatchedTextAppearance
m_defaultTextAppearance;
74
75
bool
m_depthTest;
76
};
77
}
78
}
79
}
Generated on Sat Jun 10 2023 02:00:30 for eeGeo Platform SDK by
1.8.3.1