mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:20:04 +00:00
Extracting FontBuffer logic from Font
This commit is contained in:
parent
f21523d88b
commit
ee0f3b35bf
6 changed files with 232 additions and 177 deletions
|
|
@ -74,9 +74,10 @@ void TextShader::RenderText(const std::string& text,
|
|||
gl.glActiveTexture(GL_TEXTURE0);
|
||||
gl.glBindTexture(GL_TEXTURE_2D, textureId);
|
||||
|
||||
std::shared_ptr<util::FontBuffer> buffer = util::Font::CreateBuffer();
|
||||
std::shared_ptr<util::FontBuffer> buffer =
|
||||
std::make_shared<util::FontBuffer>();
|
||||
font->BufferText(buffer, text, x, y, scale, color);
|
||||
util::Font::RenderBuffer(gl, buffer);
|
||||
buffer->Render(gl);
|
||||
}
|
||||
|
||||
void TextShader::SetProjection(const glm::mat4& projection)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue