U Team Core

U Team Core

37M Downloads

[1.15.2] Issue with the scrolling and scalling text renderer

HyCraftHD opened this issue ยท 0 comments

commented

As described in MC-U-Team/Music-Player#34 there is an issue with the scalling text renderer that leads to some strange artifacs.

protected void renderFont(float x, float y) {
GL11.glPushMatrix();
GL11.glTranslatef(x, y, 0);
GL11.glScalef(scale, scale, 0);
if (shadow) {
fontRenderSupplier.get().drawStringWithShadow(text, 0, 0, color);
} else {
fontRenderSupplier.get().drawString(text, 0, 0, color);
}
GL11.glPopMatrix();
}

An issue could also be in the scrolling text renderer:

GL11.glPushMatrix();
GL11.glEnable(GL11.GL_SCISSOR_TEST);
GL11.glScissor(nativeX, window.getHeight() - (nativeY + nativeHeight), nativeWidth, nativeHeight);
// Gui.drawRect(0, 0, window.getScaledWidth(), window.getScaledHeight(), 0xFF00FF00); // test scissor
super.draw(getMovingX(x), y + 2);
GL11.glDisable(GL11.GL_SCISSOR_TEST);
GL11.glPopMatrix();