18 #ifndef INCLUDED_TEXTRENDERER 19 #define INCLUDED_TEXTRENDERER 42 void Translate(
float x,
float y,
float z);
60 void Color(
float r,
float g,
float b,
float a = 1.0);
77 void PrintfAt(
float x,
float y,
const wchar_t* fmt, ...);
89 void Put(
float x,
float y,
const wchar_t* buf);
96 void Put(
float x,
float y,
const char* buf);
104 void Put(
float x,
float y,
const std::wstring* buf);
162 void PutString(
float x,
float y,
const std::wstring* buf,
bool owned);
178 #endif // INCLUDED_TEXTRENDERER shared_ptr< CFont > m_Font
Definition: TextRenderer.h:171
void PrintfAt(float x, float y, const wchar_t *fmt,...)
Print formatted text at (x,y) under the current transform.
Definition: TextRenderer.cpp:117
void Translate(float x, float y, float z)
Definition: TextRenderer.cpp:64
void Font(CStrIntern font)
Set the font for subsequent print calls.
Definition: TextRenderer.cpp:91
void PutString(float x, float y, const std::wstring *buf, bool owned)
Definition: TextRenderer.cpp:165
void Render()
Render all of the previously printed text calls.
Definition: TextRenderer.cpp:223
CMatrix3D GetTransform()
Definition: TextRenderer.cpp:53
void PutAdvance(const wchar_t *buf)
Print text at (0,0) under the current transform, and advance the transform by the width of the text...
Definition: TextRenderer.cpp:132
CMatrix3D transform
Definition: TextRenderer.h:156
A list of SBatchRuns, with a single font/color/transform, to be rendered in a single GL call...
Definition: TextRenderer.h:153
bool m_Dirty
Definition: TextRenderer.h:173
CTextRenderer(const CShaderProgramPtr &shader)
Definition: TextRenderer.cpp:30
std::list< SBatchRun > runs
Definition: TextRenderer.h:159
CColor m_Color
Definition: TextRenderer.h:169
Definition: TextRenderer.h:28
CMatrix3D m_Transform
Definition: TextRenderer.h:166
float x
Definition: TextRenderer.h:143
Definition: Matrix3D.h:33
shared_ptr< CFont > font
Definition: TextRenderer.h:158
CShaderProgramPtr m_Shader
Definition: TextRenderer.h:164
CColor color
Definition: TextRenderer.h:157
SBatchRun(const SBatchRun &str)
Definition: TextRenderer.h:128
float y
Definition: TextRenderer.h:143
const std::wstring * text
Definition: TextRenderer.h:145
void Put(float x, float y, const wchar_t *buf)
Print text at (x,y) under the current transform.
Definition: TextRenderer.cpp:141
void Color(const CColor &color)
Set the color for subsequent print calls.
Definition: TextRenderer.cpp:77
void PrintfAdvance(const wchar_t *fmt,...)
Print formatted text at (0,0) under the current transform, and advance the transform by the width of ...
Definition: TextRenderer.cpp:101
Interned 8-bit strings.
Definition: CStrIntern.h:37
void ResetTransform()
Reset the text transform to the default, with (0,0) in the top-left of the screen.
Definition: TextRenderer.cpp:38
size_t chars
Definition: TextRenderer.h:155
CRect m_Clipping
Definition: TextRenderer.h:167
Storage for a bitmap font.
Definition: Font.h:32
void SetTransform(const CMatrix3D &transform)
Definition: TextRenderer.cpp:58
Definition: TextRenderer.cpp:210
SBatchRun()
Definition: TextRenderer.h:123
bool owned
Definition: TextRenderer.h:146
SBatchRun & operator=(const SBatchRun &)
std::list< SBatch > m_Batches
Definition: TextRenderer.h:175
A string (optionally owned by this object, or else pointing to an externally-owned string) with a pos...
Definition: TextRenderer.h:118
void SetClippingRect(const CRect &rect)
Set clipping rectangle, in pre-transform coordinates (i.e.
Definition: TextRenderer.cpp:72
std::shared_ptr< CShaderProgram > CShaderProgramPtr
Definition: ShaderProgramPtr.h:25
CStrIntern m_FontName
Definition: TextRenderer.h:170
~SBatchRun()
Definition: TextRenderer.h:137
Rectangle class used for screen rectangles.
Definition: Shapes.h:73