aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/graphics/fonts/je_texture_font.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-01-07 09:54:08 +0800
committerchai <chaifix@163.com>2019-01-07 09:54:08 +0800
commit2af7f2f5e3da8f6c236e7996781950e1bc6c1f9c (patch)
treef6a8a9618e146c93e4d4d964a6e13cd16f528693 /src/libjin/graphics/fonts/je_texture_font.cpp
parent909e544ed322b28a6f59febf3213e05068e9e93c (diff)
parentda056982e50bdd9cb9f944691cc88ca98b053b77 (diff)
Merge branch 'master' of warmcat.org:/home/git-repo/Jin
Diffstat (limited to 'src/libjin/graphics/fonts/je_texture_font.cpp')
-rw-r--r--src/libjin/graphics/fonts/je_texture_font.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libjin/graphics/fonts/je_texture_font.cpp b/src/libjin/graphics/fonts/je_texture_font.cpp
index 016367c..49ac797 100644
--- a/src/libjin/graphics/fonts/je_texture_font.cpp
+++ b/src/libjin/graphics/fonts/je_texture_font.cpp
@@ -276,7 +276,7 @@ namespace JinEngine
const vector<GlyphArrayDrawInfo>& glyphinfolist = page->glyphinfolist;
const vector<GlyphVertex>& glyphvertices = page->glyphvertices;
Matrix modelMatrix = gl.getModelViewMatrix(x, y, 1, 1, 0, 0, 0);
- shader->prepare()
+ shader->begin()
.sendMatrix4(SHADER_MODELVIEW_MATRIX, &modelMatrix)
.sendMatrix4(SHADER_PROJECTION_MATRIX, &gl.getProjectionMatrix());
for (int i = 0; i < glyphinfolist.size(); ++i)
@@ -288,6 +288,7 @@ namespace JinEngine
gl.drawArrays(GL_QUADS, 0, info.count);
gl.bindTexture(0);
}
+ shader->end();
}
void TextureFont::render(const Content& text, int x, int y, int lineheight, int spacing)