void Pane::DrawTextOverlay( const std::string text, int x, int y, const ShaderWithVariables& sh, const BMFont& font) const { const glm::mat4 modelview(1.0f); const glm::mat4 projection = glm::ortho( 0.0f, static_cast<float>(m_paneRenderBuffer.w), static_cast<float>(m_paneRenderBuffer.h), 0.0f, -1.0f, 1.0f); font.DrawString(text, x, y, modelview, projection, sh); }
void Pane::DrawTextOverlay( const std::string text, int x, int y, const ShaderWithVariables& sh, const BMFont& font) const { if (m_visible == false) return; const glm::mat4 modelview(1.0f); const glm::mat4 projection = glm::ortho( 0.0f, // Text size is tuned to font size and max shader title/author/license length static_cast<float>(600),//m_paneRenderBuffer.w), static_cast<float>(600),//m_paneRenderBuffer.h), 0.0f, -1.0f, 1.0f); font.DrawString(text, x, y, modelview, projection, sh); }