diff options
author | chai <chaifix@163.com> | 2019-01-08 23:51:24 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-08 23:51:24 +0800 |
commit | e7800a488a97f3172029aba82e6912ad50f7ae32 (patch) | |
tree | 7cad16c52e1ab2501fa57ed8a0e20226d09b1dd2 /src/libjin/graphics/fonts/je_ttf.cpp | |
parent | e723aeaa9bb30658cd5f5b1e911e6487be70c69b (diff) |
*opengl backend
Diffstat (limited to 'src/libjin/graphics/fonts/je_ttf.cpp')
-rw-r--r-- | src/libjin/graphics/fonts/je_ttf.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libjin/graphics/fonts/je_ttf.cpp b/src/libjin/graphics/fonts/je_ttf.cpp index 89aa096..7c40e7b 100644 --- a/src/libjin/graphics/fonts/je_ttf.cpp +++ b/src/libjin/graphics/fonts/je_ttf.cpp @@ -197,7 +197,7 @@ namespace JinEngine GLuint t; gl.flushError(); t = gl.genTexture(); - gl.bindTexture(t); + gl.bindTexture2D(t); gl.setTexParameter(GL_TEXTURE_MAG_FILTER, GL_LINEAR); gl.setTexParameter(GL_TEXTURE_MIN_FILTER, GL_LINEAR); gl.setTexParameter(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); @@ -206,11 +206,11 @@ namespace JinEngine if (glGetError() != GL_NO_ERROR) { glDeleteTextures(1, &t); - gl.bindTexture(0); + gl.bindTexture2D(0); return 0; } atlases.push_back(t); - gl.bindTexture(0); + gl.bindTexture2D(0); return t; } @@ -303,9 +303,9 @@ namespace JinEngine const GlyphArrayDrawInfo& info = glyphinfolist[i]; shader->uploadVertices(2, GL_INT, sizeof(GlyphVertex), &glyphvertices[info.start].x) .uploadUV(2, GL_FLOAT, sizeof(GlyphVertex), &glyphvertices[info.start].u); - gl.bindTexture(info.texture); + gl.bindTexture2D(info.texture); gl.drawArrays(GL_QUADS, 0, info.count); - gl.bindTexture(0); + gl.bindTexture2D(0); } shader->end(); } @@ -422,9 +422,9 @@ namespace JinEngine cursor.y() = 0; } } - gl.bindTexture(atlas); + gl.bindTexture2D(atlas); gl.texSubImage(cursor.x() + xoff, cursor.y() + yoff + baseline, w, h, GL_RGBA, GL_UNSIGNED_BYTE, bitmap); - gl.bindTexture(); + gl.bindTexture2D(); delete[] bitmap; } TTFGlyph glyph; |