more OpenGL constants
This commit is contained in:
parent
abc2f6ab50
commit
fe57a2909a
28 changed files with 96 additions and 88 deletions
|
@ -34,7 +34,7 @@ public abstract class Drawing {
|
|||
// float xs = 1.0f / (float)tw; // 0.00390625F;
|
||||
// float ys = 1.0f / (float)th; // 0.00390625F;
|
||||
// RenderBuffer rb = Tessellator.getBuffer();
|
||||
// rb.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
// rb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
||||
// rb.pos((double)(x + 0), (double)(y + height), 0.0).tex((double)((float)(textureX + 0) * xs), (double)((float)(textureY + height) * ys)).endVertex();
|
||||
// rb.pos((double)(x + width), (double)(y + height), 0.0).tex((double)((float)(textureX + width) * xs), (double)((float)(textureY + height) * ys)).endVertex();
|
||||
// rb.pos((double)(x + width), (double)(y + 0), 0.0).tex((double)((float)(textureX + width) * xs), (double)((float)(textureY + 0) * ys)).endVertex();
|
||||
|
@ -51,7 +51,7 @@ public abstract class Drawing {
|
|||
GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
Font.bindTexture();
|
||||
RenderBuffer rb = Tessellator.getBuffer();
|
||||
rb.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
rb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
int h = Font.YGLYPH;
|
||||
int tx, ty, u, v;
|
||||
FontChar glyph;
|
||||
|
@ -310,7 +310,7 @@ public abstract class Drawing {
|
|||
GlState.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
Font.bindTexture();
|
||||
RenderBuffer rb = Tessellator.getBuffer();
|
||||
rb.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
rb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
int ox = x;
|
||||
int ncolor = color;
|
||||
FontChar glyph;
|
||||
|
@ -419,7 +419,7 @@ public abstract class Drawing {
|
|||
GlState.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
|
||||
GlState.shadeModel(GL11.GL_SMOOTH);
|
||||
RenderBuffer buf = Tessellator.getBuffer();
|
||||
buf.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
buf.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
|
||||
buf.pos((double)(x + w), (double)y, 0.0).color(ctop).endVertex();
|
||||
buf.pos((double)x, (double)y, 0.0).color(ctop).endVertex();
|
||||
buf.pos((double)x, (double)(y + h), 0.0).color(cbottom).endVertex();
|
||||
|
@ -439,7 +439,7 @@ public abstract class Drawing {
|
|||
GlState.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
|
||||
GlState.shadeModel(GL11.GL_SMOOTH);
|
||||
RenderBuffer buf = Tessellator.getBuffer();
|
||||
buf.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
buf.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
|
||||
buf.pos((double)(x + w), (double)y, 0.0).color(topright).endVertex();
|
||||
buf.pos((double)x, (double)y, 0.0).color(lopleft).endVertex();
|
||||
buf.pos((double)x, (double)(y + h), 0.0).color(btmleft).endVertex();
|
||||
|
@ -460,7 +460,7 @@ public abstract class Drawing {
|
|||
GlState.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
|
||||
GlState.shadeModel(GL11.GL_SMOOTH);
|
||||
GlState.color(color);
|
||||
rb.begin(7, DefaultVertexFormats.POSITION);
|
||||
rb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
|
||||
rb.pos((double)x, (double)(y + h), 0.0D).endVertex();
|
||||
rb.pos((double)(x + w), (double)(y + h), 0.0D).endVertex();
|
||||
rb.pos((double)(x + w), (double)y, 0.0D).endVertex();
|
||||
|
@ -554,7 +554,7 @@ public abstract class Drawing {
|
|||
gm.getTextureManager().bindTexture(texture);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
double scale = 32.0;
|
||||
buf.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
buf.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
buf.pos(x, y + height, 0.0D).tex(0.0D, height / scale)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x + width, y + height, 0.0D)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue