what
This commit is contained in:
parent
4a1a26a493
commit
1479f7483a
@ -212,19 +212,23 @@ class Font(
|
||||
model.translate(x = -lineWidth - movedX, y = lineHeight)
|
||||
}
|
||||
|
||||
client.programs.font.use()
|
||||
client.programs.font.colorMultiplier = color
|
||||
client.programs.font.worldMatrix = client.stack.last()
|
||||
builder.end()
|
||||
|
||||
builder.upload(vbo, ebo, GL_STREAM_DRAW)
|
||||
if (builder.elementCount != 0) {
|
||||
client.programs.font.use()
|
||||
client.programs.font.colorMultiplier = color
|
||||
client.programs.font.worldMatrix = client.stack.last()
|
||||
|
||||
client.activeTexture = 0
|
||||
atlas.bind()
|
||||
builder.upload(vbo, ebo, GL_STREAM_DRAW)
|
||||
|
||||
client.vao = vao
|
||||
glDrawElements(GL_TRIANGLES, builder.indexCount, builder.indexType, 0L)
|
||||
checkForGLError()
|
||||
client.vao = null
|
||||
client.activeTexture = 0
|
||||
atlas.bind()
|
||||
|
||||
client.vao = vao
|
||||
glDrawElements(GL_TRIANGLES, builder.indexCount, builder.indexType, 0L)
|
||||
checkForGLError()
|
||||
client.vao = null
|
||||
}
|
||||
|
||||
return TextSize(totalX * scale, totalY * scale)
|
||||
}
|
||||
@ -261,10 +265,8 @@ class Font(
|
||||
if (chr == '\t') {
|
||||
if (lineGlyphs % 4 == 0) {
|
||||
lineWidth += space.advanceX * 4
|
||||
client.stack.last().translate(x = space.advanceX * 4)
|
||||
} else {
|
||||
lineWidth += space.advanceX * (lineGlyphs % 4)
|
||||
client.stack.last().translate(x = space.advanceX * (lineGlyphs % 4))
|
||||
}
|
||||
|
||||
lineGlyphs += lineGlyphs % 4
|
||||
|
Loading…
Reference in New Issue
Block a user