Added font scaling factor to text overlay class
This commit is contained in:
parent
03b671562b
commit
f71fb107fc
1 changed files with 10 additions and 2 deletions
|
|
@ -81,6 +81,8 @@ public:
|
||||||
bool visible = true;
|
bool visible = true;
|
||||||
bool invalidated = false;
|
bool invalidated = false;
|
||||||
|
|
||||||
|
float scale = 1.0f;
|
||||||
|
|
||||||
std::vector<VkCommandBuffer> cmdBuffers;
|
std::vector<VkCommandBuffer> cmdBuffers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -551,8 +553,14 @@ public:
|
||||||
{
|
{
|
||||||
assert(vertexBuffer.mapped != nullptr);
|
assert(vertexBuffer.mapped != nullptr);
|
||||||
|
|
||||||
const float charW = 1.5f / *frameBufferWidth;
|
if (align == alignLeft) {
|
||||||
const float charH = 1.5f / *frameBufferHeight;
|
x *= scale;
|
||||||
|
};
|
||||||
|
|
||||||
|
y *= scale;
|
||||||
|
|
||||||
|
const float charW = (1.5f * scale) / *frameBufferWidth;
|
||||||
|
const float charH = (1.5f * scale) / *frameBufferHeight;
|
||||||
|
|
||||||
float fbW = (float)*frameBufferWidth;
|
float fbW = (float)*frameBufferWidth;
|
||||||
float fbH = (float)*frameBufferHeight;
|
float fbH = (float)*frameBufferHeight;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue