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