Added font scaling factor to text overlay class

This commit is contained in:
saschawillems 2017-03-07 21:51:56 +01:00
parent 03b671562b
commit f71fb107fc

View file

@ -81,6 +81,8 @@ public:
bool visible = true;
bool invalidated = false;
float scale = 1.0f;
std::vector<VkCommandBuffer> cmdBuffers;
/**
@ -551,8 +553,14 @@ public:
{
assert(vertexBuffer.mapped != nullptr);
const float charW = 1.5f / *frameBufferWidth;
const float charH = 1.5f / *frameBufferHeight;
if (align == alignLeft) {
x *= scale;
};
y *= scale;
const float charW = (1.5f * scale) / *frameBufferWidth;
const float charH = (1.5f * scale) / *frameBufferHeight;
float fbW = (float)*frameBufferWidth;
float fbH = (float)*frameBufferHeight;