summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/font/text_buffer_manager.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/common/font/text_buffer_manager.h')
-rw-r--r--3rdparty/bgfx/examples/common/font/text_buffer_manager.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/3rdparty/bgfx/examples/common/font/text_buffer_manager.h b/3rdparty/bgfx/examples/common/font/text_buffer_manager.h
index 788fba800ca..6e20080e3cd 100644
--- a/3rdparty/bgfx/examples/common/font/text_buffer_manager.h
+++ b/3rdparty/bgfx/examples/common/font/text_buffer_manager.h
@@ -1,6 +1,6 @@
/*
* Copyright 2013 Jeremie Roy. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
+ * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
*/
#ifndef TEXT_BUFFER_MANAGER_H_HEADER_GUARD
@@ -8,7 +8,7 @@
#include "font_manager.h"
-BGFX_HANDLE(TextBufferHandle);
+BGFX_HANDLE(TextBufferHandle)
#define MAX_TEXT_BUFFER_COUNT 64
@@ -57,6 +57,13 @@ public:
void setUnderlineColor(TextBufferHandle _handle, uint32_t _rgba = 0x000000FF);
void setStrikeThroughColor(TextBufferHandle _handle, uint32_t _rgba = 0x000000FF);
+ void setOutlineWidth(TextBufferHandle _handle, float _outlineWidth = 3.0f);
+ void setOutlineColor(TextBufferHandle _handle, uint32_t _rgba = 0x000000FF);
+
+ void setDropShadowOffset(TextBufferHandle _handle, float _u, float _v);
+ void setDropShadowColor(TextBufferHandle _handle, uint32_t _rgba = 0x000000FF);
+ void setDropShadowSoftener(TextBufferHandle _handle, float smoother = 1.0f);
+
void setPenPosition(TextBufferHandle _handle, float _x, float _y);
/// Append an ASCII/utf-8 string to the buffer using current pen position and color.
@@ -87,11 +94,18 @@ private:
BufferCache* m_textBuffers;
bx::HandleAllocT<MAX_TEXT_BUFFER_COUNT> m_textBufferHandles;
FontManager* m_fontManager;
- bgfx::VertexDecl m_vertexDecl;
+ bgfx::VertexLayout m_vertexLayout;
bgfx::UniformHandle s_texColor;
+ bgfx::UniformHandle u_dropShadowColor;
+ bgfx::UniformHandle u_params;
bgfx::ProgramHandle m_basicProgram;
bgfx::ProgramHandle m_distanceProgram;
bgfx::ProgramHandle m_distanceSubpixelProgram;
+ bgfx::ProgramHandle m_distanceOutlineProgram;
+ bgfx::ProgramHandle m_distanceOutlineImageProgram;
+ bgfx::ProgramHandle m_distanceDropShadowProgram;
+ bgfx::ProgramHandle m_distanceDropShadowImageProgram;
+ bgfx::ProgramHandle m_distanceOutlineDropShadowImageProgram;
};
#endif // TEXT_BUFFER_MANAGER_H_HEADER_GUARD