more OpenGL constants

This commit is contained in:
Sen 2025-03-19 23:49:49 +01:00
parent abc2f6ab50
commit fe57a2909a
28 changed files with 96 additions and 88 deletions

View file

@ -244,7 +244,7 @@ public abstract class Gui {
// GlState.disableTexture2D();
// GlState.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
// GlState.color(f, f1, f2, f3);
// worldrenderer.begin(7, DefaultVertexFormats.POSITION);
// worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
// worldrenderer.pos((double)left, (double)bottom, 0.0D).endVertex();
// worldrenderer.pos((double)right, (double)bottom, 0.0D).endVertex();
// worldrenderer.pos((double)right, (double)top, 0.0D).endVertex();
@ -259,7 +259,7 @@ public abstract class Gui {
// float f = 0.00390625F;
// float f1 = 0.00390625F;
// RenderBuffer worldrenderer = Tessellator.getBuffer();
// worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
// worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
// worldrenderer.pos((double)(x + 0), (double)(y + height), 0.0D).tex((double)((float)(textureX + 0) * f), (double)((float)(textureY + height) * f1)).endVertex();
// worldrenderer.pos((double)(x + width), (double)(y + height), 0.0D).tex((double)((float)(textureX + width) * f), (double)((float)(textureY + height) * f1)).endVertex();
// worldrenderer.pos((double)(x + width), (double)(y + 0), 0.0D).tex((double)((float)(textureX + width) * f), (double)((float)(textureY + 0) * f1)).endVertex();
@ -272,7 +272,7 @@ public abstract class Gui {
// float f = 1.0F / tileWidth;
// float f1 = 1.0F / tileHeight;
// RenderBuffer worldrenderer = Tessellator.getBuffer();
// worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
// worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
// worldrenderer.pos((double)x, (double)(y + height), 0.0D).tex((double)(u * f), (double)((v + (float)vHeight) * f1)).endVertex();
// worldrenderer.pos((double)(x + width), (double)(y + height), 0.0D).tex((double)((u + (float)uWidth) * f), (double)((v + (float)vHeight) * f1)).endVertex();
// worldrenderer.pos((double)(x + width), (double)y, 0.0D).tex((double)((u + (float)uWidth) * f), (double)(v * f1)).endVertex();
@ -296,7 +296,7 @@ public abstract class Gui {
// GlState.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
// GlState.shadeModel(GL11.GL_SMOOTH);
// RenderBuffer worldrenderer = Tessellator.getBuffer();
// worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
// worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
// worldrenderer.pos((double)right, (double)top, 0.0).color(f1, f2, f3, f).endVertex();
// worldrenderer.pos((double)left, (double)top, 0.0).color(f1, f2, f3, f).endVertex();
// worldrenderer.pos((double)left, (double)bottom, 0.0).color(f5, f6, f7, f4).endVertex();

View file

@ -168,7 +168,7 @@ public abstract class GuiList<T extends ListEntry> extends Gui
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
float f = 32.0F;
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos((double)this.left, (double)this.bottom, 0.0D).tex((double)((float)this.left / f), (double)((float)(this.bottom + (int)this.amountScrolled) / f)).color(32, 32, 32, 255).endVertex();
worldrenderer.pos((double)this.right, (double)this.bottom, 0.0D).tex((double)((float)this.right / f), (double)((float)(this.bottom + (int)this.amountScrolled) / f)).color(32, 32, 32, 255).endVertex();
worldrenderer.pos((double)this.right, (double)this.top, 0.0D).tex((double)((float)this.right / f), (double)((float)(this.top + (int)this.amountScrolled) / f)).color(32, 32, 32, 255).endVertex();
@ -191,13 +191,13 @@ public abstract class GuiList<T extends ListEntry> extends Gui
GlState.disableTexture2D();
int i1 = 4;
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos((double)this.left, (double)(this.top + i1), 0.0D).tex(0.0D, 1.0D).color(0, 0, 0, 0).endVertex();
worldrenderer.pos((double)this.right, (double)(this.top + i1), 0.0D).tex(1.0D, 1.0D).color(0, 0, 0, 0).endVertex();
worldrenderer.pos((double)this.right, (double)this.top, 0.0D).tex(1.0D, 0.0D).color(0, 0, 0, 255).endVertex();
worldrenderer.pos((double)this.left, (double)this.top, 0.0D).tex(0.0D, 0.0D).color(0, 0, 0, 255).endVertex();
Tessellator.draw();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos((double)this.left, (double)this.bottom, 0.0D).tex(0.0D, 1.0D).color(0, 0, 0, 255).endVertex();
worldrenderer.pos((double)this.right, (double)this.bottom, 0.0D).tex(1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
worldrenderer.pos((double)this.right, (double)(this.bottom - i1), 0.0D).tex(1.0D, 0.0D).color(0, 0, 0, 0).endVertex();
@ -217,19 +217,19 @@ public abstract class GuiList<T extends ListEntry> extends Gui
l1 = this.top;
}
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos((double)i, (double)this.bottom, 0.0D).tex(0.0D, 1.0D).color(0, 0, 0, 255).endVertex();
worldrenderer.pos((double)j, (double)this.bottom, 0.0D).tex(1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
worldrenderer.pos((double)j, (double)this.top, 0.0D).tex(1.0D, 0.0D).color(0, 0, 0, 255).endVertex();
worldrenderer.pos((double)i, (double)this.top, 0.0D).tex(0.0D, 0.0D).color(0, 0, 0, 255).endVertex();
Tessellator.draw();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos((double)i, (double)(l1 + k1), 0.0D).tex(0.0D, 1.0D).color(128, 128, 128, 255).endVertex();
worldrenderer.pos((double)j, (double)(l1 + k1), 0.0D).tex(1.0D, 1.0D).color(128, 128, 128, 255).endVertex();
worldrenderer.pos((double)j, (double)l1, 0.0D).tex(1.0D, 0.0D).color(128, 128, 128, 255).endVertex();
worldrenderer.pos((double)i, (double)l1, 0.0D).tex(0.0D, 0.0D).color(128, 128, 128, 255).endVertex();
Tessellator.draw();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos((double)i, (double)(l1 + k1 - 1), 0.0D).tex(0.0D, 1.0D).color(192, 192, 192, 255).endVertex();
worldrenderer.pos((double)(j - 1), (double)(l1 + k1 - 1), 0.0D).tex(1.0D, 1.0D).color(192, 192, 192, 255).endVertex();
worldrenderer.pos((double)(j - 1), (double)l1, 0.0D).tex(1.0D, 0.0D).color(192, 192, 192, 255).endVertex();
@ -335,7 +335,7 @@ public abstract class GuiList<T extends ListEntry> extends Gui
int x2 = this.left + this.width / 2 + this.getListWidth() / 2;
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
GlState.disableTexture2D();
rb.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
rb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
rb.pos((double)x1, (double)(y1 + h + 2), 0.0D).tex(0.0D, 1.0D).color(128, 128, 128, 255).endVertex();
rb.pos((double)x2, (double)(y1 + h + 2), 0.0D).tex(1.0D, 1.0D).color(128, 128, 128, 255).endVertex();
rb.pos((double)x2, (double)(y1 - 2), 0.0D).tex(1.0D, 0.0D).color(128, 128, 128, 255).endVertex();
@ -361,7 +361,7 @@ public abstract class GuiList<T extends ListEntry> extends Gui
this.gm.getTextureManager().bindTexture(Gui.DIRT_BACKGROUND);
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
float f = 32.0F;
rb.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
rb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
rb.pos((double)this.left, (double)endY, 0.0D).tex(0.0D, (double)((float)endY / 32.0F)).color(64, 64, 64, endAlpha).endVertex();
rb.pos((double)(this.left + this.width), (double)endY, 0.0D).tex((double)((float)this.width / 32.0F), (double)((float)endY / 32.0F)).color(64, 64, 64, endAlpha).endVertex();
rb.pos((double)(this.left + this.width), (double)startY, 0.0D).tex((double)((float)this.width / 32.0F), (double)((float)startY / 32.0F)).color(64, 64, 64, startAlpha).endVertex();