diff options
Diffstat (limited to 'src/libjin/graphics/fonts/je_texture_font.cpp')
-rw-r--r-- | src/libjin/graphics/fonts/je_texture_font.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libjin/graphics/fonts/je_texture_font.cpp b/src/libjin/graphics/fonts/je_texture_font.cpp index 97f1f2f..bd1b061 100644 --- a/src/libjin/graphics/fonts/je_texture_font.cpp +++ b/src/libjin/graphics/fonts/je_texture_font.cpp @@ -276,15 +276,14 @@ 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->sendMatrix4(SHADER_MODELVIEW_MATRIX, &modelMatrix); shader->sendMatrix4(SHADER_PROJECTION_MATRIX, &gl.getProjectionMatrix()); for (int i = 0; i < glyphinfolist.size(); ++i) { const GlyphArrayDrawInfo& info = glyphinfolist[i]; - shader->beginUploadAttributes(); shader->uploadVertices(2, GL_INT, sizeof(GlyphVertex), &glyphvertices[info.start].x); shader->uploadUV(2, GL_FLOAT, sizeof(GlyphVertex), &glyphvertices[info.start].u); - shader->endUploadAttributes(); gl.bindTexture(info.texture); gl.drawArrays(GL_QUADS, 0, info.count); gl.bindTexture(0); |