本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.disableFog方法的典型用法代码示例。如果您正苦于以下问题:Java GlStateManager.disableFog方法的具体用法?Java GlStateManager.disableFog怎么用?Java GlStateManager.disableFog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.GlStateManager
的用法示例。
在下文中一共展示了GlStateManager.disableFog方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawBackground
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Draws the background (i is always 0 as of 1.2.2)
*/
public void drawBackground(int tint)
{
GlStateManager.disableLighting();
GlStateManager.disableFog();
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
this.mc.getTextureManager().bindTexture(optionsBackground);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
float f = 32.0F;
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos(0.0D, (double)this.height, 0.0D).tex(0.0D, (double)((float)this.height / 32.0F + (float)tint)).color(64, 64, 64, 255).endVertex();
worldrenderer.pos((double)this.width, (double)this.height, 0.0D).tex((double)((float)this.width / 32.0F), (double)((float)this.height / 32.0F + (float)tint)).color(64, 64, 64, 255).endVertex();
worldrenderer.pos((double)this.width, 0.0D, 0.0D).tex((double)((float)this.width / 32.0F), (double)tint).color(64, 64, 64, 255).endVertex();
worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double)tint).color(64, 64, 64, 255).endVertex();
tessellator.draw();
}
示例2: renderBeacon
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderBeacon(double p_188206_1_, double p_188206_3_, double p_188206_5_, double p_188206_7_, double p_188206_9_, List<TileEntityBeacon.BeamSegment> p_188206_11_, double p_188206_12_)
{
GlStateManager.alphaFunc(516, 0.1F);
this.bindTexture(TEXTURE_BEACON_BEAM);
if (p_188206_9_ > 0.0D)
{
GlStateManager.disableFog();
int i = 0;
for (int j = 0; j < p_188206_11_.size(); ++j)
{
TileEntityBeacon.BeamSegment tileentitybeacon$beamsegment = (TileEntityBeacon.BeamSegment)p_188206_11_.get(j);
renderBeamSegment(p_188206_1_, p_188206_3_, p_188206_5_, p_188206_7_, p_188206_9_, p_188206_12_, i, tileentitybeacon$beamsegment.getHeight(), tileentitybeacon$beamsegment.getColors());
i += tileentitybeacon$beamsegment.getHeight();
}
GlStateManager.enableFog();
}
}
示例3: renderTileEntityAt
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderTileEntityAt(TileEntityEndPortal te, double x, double y, double z, float partialTicks, int destroyStage)
{
GlStateManager.disableFog();
TileEntityEndGateway tileentityendgateway = (TileEntityEndGateway)te;
if (tileentityendgateway.isSpawning() || tileentityendgateway.isCoolingDown())
{
GlStateManager.alphaFunc(516, 0.1F);
this.bindTexture(END_GATEWAY_BEAM_TEXTURE);
float f = tileentityendgateway.isSpawning() ? tileentityendgateway.getSpawnPercent(partialTicks) : tileentityendgateway.getCooldownPercent(partialTicks);
double d0 = tileentityendgateway.isSpawning() ? 256.0D - y : 50.0D;
f = MathHelper.sin(f * (float)Math.PI);
int i = MathHelper.floor((double)f * d0);
float[] afloat = EntitySheep.getDyeRgb(tileentityendgateway.isSpawning() ? EnumDyeColor.MAGENTA : EnumDyeColor.PURPLE);
TileEntityBeaconRenderer.renderBeamSegment(x, y, z, (double)partialTicks, (double)f, (double)tileentityendgateway.getWorld().getTotalWorldTime(), 0, i, afloat, 0.15D, 0.175D);
TileEntityBeaconRenderer.renderBeamSegment(x, y, z, (double)partialTicks, (double)f, (double)tileentityendgateway.getWorld().getTotalWorldTime(), 0, -i, afloat, 0.15D, 0.175D);
}
super.renderTileEntityAt(te, x, y, z, partialTicks, destroyStage);
GlStateManager.enableFog();
}
示例4: preLoadShader
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void preLoadShader()
{
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
GlStateManager.disableDepth();
GlStateManager.disableAlpha();
GlStateManager.disableFog();
GlStateManager.disableLighting();
GlStateManager.disableColorMaterial();
GlStateManager.enableTexture2D();
GlStateManager.bindTexture(0);
}
示例5: drawScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
*/
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
this.field_175349_r.drawScreen(mouseX, mouseY, partialTicks);
this.drawCenteredString(this.fontRendererObj, this.field_175341_a, this.width / 2, 2, 16777215);
this.drawCenteredString(this.fontRendererObj, this.field_175333_f, this.width / 2, 12, 16777215);
this.drawCenteredString(this.fontRendererObj, this.field_175335_g, this.width / 2, 22, 16777215);
super.drawScreen(mouseX, mouseY, partialTicks);
if (this.field_175339_B != 0)
{
drawRect(0, 0, this.width, this.height, Integer.MIN_VALUE);
this.drawHorizontalLine(this.width / 2 - 91, this.width / 2 + 90, 99, -2039584);
this.drawHorizontalLine(this.width / 2 - 91, this.width / 2 + 90, 185, -6250336);
this.drawVerticalLine(this.width / 2 - 91, 99, 185, -2039584);
this.drawVerticalLine(this.width / 2 + 90, 99, 185, -6250336);
float f = 85.0F;
float f1 = 180.0F;
GlStateManager.disableLighting();
GlStateManager.disableFog();
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
this.mc.getTextureManager().bindTexture(optionsBackground);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
float f2 = 32.0F;
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos((double)(this.width / 2 - 90), 185.0D, 0.0D).tex(0.0D, 2.65625D).color(64, 64, 64, 64).endVertex();
worldrenderer.pos((double)(this.width / 2 + 90), 185.0D, 0.0D).tex(5.625D, 2.65625D).color(64, 64, 64, 64).endVertex();
worldrenderer.pos((double)(this.width / 2 + 90), 100.0D, 0.0D).tex(5.625D, 0.0D).color(64, 64, 64, 64).endVertex();
worldrenderer.pos((double)(this.width / 2 - 90), 100.0D, 0.0D).tex(0.0D, 0.0D).color(64, 64, 64, 64).endVertex();
tessellator.draw();
this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirmTitle", new Object[0]), this.width / 2, 105, 16777215);
this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirm1", new Object[0]), this.width / 2, 125, 16777215);
this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirm2", new Object[0]), this.width / 2, 135, 16777215);
this.field_175352_x.drawButton(this.mc, mouseX, mouseY);
this.field_175351_y.drawButton(this.mc, mouseX, mouseY);
}
}
示例6: drawScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void drawScreen()
{
GlStateManager.disableLighting();
GlStateManager.disableFog();
Tessellator tessellator = Tessellator.getInstance();
IBufferProxy buffer = Util.getBufferProxy();
this.mc.getTextureManager().bindTexture(Gui.OPTIONS_BACKGROUND);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
float f = 32.0F;
buffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
buffer.pos((double) this.left, (double) this.bottom, 0.0D).tex((double) ((float) this.left / f), (double) ((float) this.bottom / f)).color(32, 32, 32, 255).endVertex();
buffer.pos((double) this.right, (double) this.bottom, 0.0D).tex((double) ((float) this.right / f), (double) ((float) this.bottom / f)).color(32, 32, 32, 255).endVertex();
buffer.pos((double) this.right, (double) this.top, 0.0D).tex((double) ((float) this.right / f), (double) ((float) this.top / f)).color(32, 32, 32, 255).endVertex();
buffer.pos((double) this.left, (double) this.top, 0.0D).tex((double) ((float) this.left / f), (double) ((float) this.top / f)).color(32, 32, 32, 255).endVertex();
tessellator.draw();
GlStateManager.disableDepth();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ZERO, GlStateManager.DestFactor.ONE);
GlStateManager.disableAlpha();
GlStateManager.shadeModel(7425);
GlStateManager.disableTexture2D();
buffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
buffer.pos((double) this.left, (double) (this.top + 4), 0.0D).tex(0.0D, 1.0D).color(0, 0, 0, 0).endVertex();
buffer.pos((double) this.right, (double) (this.top + 4), 0.0D).tex(1.0D, 1.0D).color(0, 0, 0, 0).endVertex();
buffer.pos((double) this.right, (double) this.top, 0.0D).tex(1.0D, 0.0D).color(0, 0, 0, 255).endVertex();
buffer.pos((double) this.left, (double) this.top, 0.0D).tex(0.0D, 0.0D).color(0, 0, 0, 255).endVertex();
tessellator.draw();
buffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
buffer.pos((double) this.left, (double) this.bottom, 0.0D).tex(0.0D, 1.0D).color(0, 0, 0, 255).endVertex();
buffer.pos((double) this.right, (double) this.bottom, 0.0D).tex(1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
buffer.pos((double) this.right, (double) (this.bottom - 4), 0.0D).tex(1.0D, 0.0D).color(0, 0, 0, 0).endVertex();
buffer.pos((double) this.left, (double) (this.bottom - 4), 0.0D).tex(0.0D, 0.0D).color(0, 0, 0, 0).endVertex();
tessellator.draw();
GlStateManager.enableTexture2D();
GlStateManager.shadeModel(7424);
GlStateManager.enableAlpha();
GlStateManager.disableBlend();
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj;
int titleWidth = fontRenderer.getStringWidth(title);
fontRenderer.drawStringWithShadow(title, this.left + ((this.right - this.left) / 2) - (titleWidth / 2), this.top + 2, 0xFFFFFF);
int topStart = this.top + 15;
for (String line : lines)
{
if (centeredF)
{
int stringWidth = fontRenderer.getStringWidth(line);
fontRenderer.drawStringWithShadow(line, this.left + ((this.right - this.left) / 2) - (stringWidth / 2), topStart, 0xFFFFFF);
}
else
{
fontRenderer.drawStringWithShadow(line, this.left, topStart, 0xFFFFFF);
}
topStart += 10;
}
}
示例7: drawScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void drawScreen(int mouseXIn, int mouseYIn, float partialTicks)
{
if (this.visible)
{
this.mouseX = mouseXIn;
this.mouseY = mouseYIn;
this.drawBackground();
int i = this.getScrollBarX();
int j = i + 6;
this.bindAmountScrolled();
GlStateManager.disableLighting();
GlStateManager.disableFog();
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
int k = this.left + this.width / 2 - this.getListWidth() / 2 + 2;
int l = this.top + 4 - (int)this.amountScrolled;
if (this.hasListHeader)
{
this.drawListHeader(k, l, tessellator);
}
this.drawSelectionBox(k, l, mouseXIn, mouseYIn);
GlStateManager.disableDepth();
this.overlayBackground(0, this.top, 255, 255);
this.overlayBackground(this.bottom, this.height, 255, 255);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ZERO, GlStateManager.DestFactor.ONE);
GlStateManager.disableAlpha();
GlStateManager.shadeModel(7425);
GlStateManager.disableTexture2D();
int i1 = this.getMaxScroll();
if (i1 > 0)
{
int j1 = (this.bottom - this.top) * (this.bottom - this.top) / this.getContentHeight();
j1 = MathHelper.clamp_int(j1, 32, this.bottom - this.top - 8);
int k1 = (int)this.amountScrolled * (this.bottom - this.top - j1) / i1 + this.top;
if (k1 < this.top)
{
k1 = this.top;
}
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos((double)i, (double)this.bottom, 0.0D).tex(0.0D, 1.0D).color(0, 0, 0, 255).endVertex();
vertexbuffer.pos((double)j, (double)this.bottom, 0.0D).tex(1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
vertexbuffer.pos((double)j, (double)this.top, 0.0D).tex(1.0D, 0.0D).color(0, 0, 0, 255).endVertex();
vertexbuffer.pos((double)i, (double)this.top, 0.0D).tex(0.0D, 0.0D).color(0, 0, 0, 255).endVertex();
tessellator.draw();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos((double)i, (double)(k1 + j1), 0.0D).tex(0.0D, 1.0D).color(128, 128, 128, 255).endVertex();
vertexbuffer.pos((double)j, (double)(k1 + j1), 0.0D).tex(1.0D, 1.0D).color(128, 128, 128, 255).endVertex();
vertexbuffer.pos((double)j, (double)k1, 0.0D).tex(1.0D, 0.0D).color(128, 128, 128, 255).endVertex();
vertexbuffer.pos((double)i, (double)k1, 0.0D).tex(0.0D, 0.0D).color(128, 128, 128, 255).endVertex();
tessellator.draw();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos((double)i, (double)(k1 + j1 - 1), 0.0D).tex(0.0D, 1.0D).color(192, 192, 192, 255).endVertex();
vertexbuffer.pos((double)(j - 1), (double)(k1 + j1 - 1), 0.0D).tex(1.0D, 1.0D).color(192, 192, 192, 255).endVertex();
vertexbuffer.pos((double)(j - 1), (double)k1, 0.0D).tex(1.0D, 0.0D).color(192, 192, 192, 255).endVertex();
vertexbuffer.pos((double)i, (double)k1, 0.0D).tex(0.0D, 0.0D).color(192, 192, 192, 255).endVertex();
tessellator.draw();
}
this.renderDecorations(mouseXIn, mouseYIn);
GlStateManager.enableTexture2D();
GlStateManager.shadeModel(7424);
GlStateManager.enableAlpha();
GlStateManager.disableBlend();
}
}
示例8: drawScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void drawScreen(int mouseXIn, int mouseYIn, float p_148128_3_)
{
if (this.field_178041_q)
{
this.mouseX = mouseXIn;
this.mouseY = mouseYIn;
this.drawBackground();
int i = this.getScrollBarX();
int j = i + 6;
this.bindAmountScrolled();
GlStateManager.disableLighting();
GlStateManager.disableFog();
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
int k = this.left + this.width / 2 - this.getListWidth() / 2 + 2;
int l = this.top + 4 - (int)this.amountScrolled;
if (this.hasListHeader)
{
this.drawListHeader(k, l, tessellator);
}
this.drawSelectionBox(k, l, mouseXIn, mouseYIn);
GlStateManager.disableDepth();
int i1 = 4;
this.overlayBackground(0, this.top, 255, 255);
this.overlayBackground(this.bottom, this.height, 255, 255);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 0, 1);
GlStateManager.disableAlpha();
GlStateManager.shadeModel(7425);
GlStateManager.disableTexture2D();
int j1 = this.func_148135_f();
if (j1 > 0)
{
int k1 = (this.bottom - this.top) * (this.bottom - this.top) / this.getContentHeight();
k1 = MathHelper.clamp_int(k1, 32, this.bottom - this.top - 8);
int l1 = (int)this.amountScrolled * (this.bottom - this.top - k1) / j1 + this.top;
if (l1 < this.top)
{
l1 = this.top;
}
worldrenderer.begin(7, 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.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.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();
worldrenderer.pos((double)i, (double)l1, 0.0D).tex(0.0D, 0.0D).color(192, 192, 192, 255).endVertex();
tessellator.draw();
}
this.func_148142_b(mouseXIn, mouseYIn);
GlStateManager.enableTexture2D();
GlStateManager.shadeModel(7424);
GlStateManager.enableAlpha();
GlStateManager.disableBlend();
}
}
示例9: drawSplashScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void drawSplashScreen(TextureManager textureManagerInstance) throws LWJGLException
{
ScaledResolution scaledresolution = new ScaledResolution(this);
int i = scaledresolution.getScaleFactor();
Framebuffer framebuffer = new Framebuffer(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i, true);
framebuffer.bindFramebuffer(false);
GlStateManager.matrixMode(5889);
GlStateManager.loadIdentity();
GlStateManager.ortho(0.0D, (double)scaledresolution.getScaledWidth(), (double)scaledresolution.getScaledHeight(), 0.0D, 1000.0D, 3000.0D);
GlStateManager.matrixMode(5888);
GlStateManager.loadIdentity();
GlStateManager.translate(0.0F, 0.0F, -2000.0F);
GlStateManager.disableLighting();
GlStateManager.disableFog();
GlStateManager.disableDepth();
GlStateManager.enableTexture2D();
InputStream inputstream = null;
try
{
inputstream = this.mcDefaultResourcePack.getInputStream(locationMojangPng);
this.mojangLogo = textureManagerInstance.getDynamicTextureLocation("logo", new DynamicTexture(ImageIO.read(inputstream)));
textureManagerInstance.bindTexture(this.mojangLogo);
}
catch (IOException ioexception)
{
logger.error((String)("Unable to load logo: " + locationMojangPng), (Throwable)ioexception);
}
finally
{
IOUtils.closeQuietly(inputstream);
}
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos(0.0D, (double)this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
worldrenderer.pos((double)this.displayWidth, (double)this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
worldrenderer.pos((double)this.displayWidth, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
tessellator.draw();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
int j = 256;
int k = 256;
this.func_181536_a((scaledresolution.getScaledWidth() - j) / 2, (scaledresolution.getScaledHeight() - k) / 2, 0, 0, j, k, 255, 255, 255, 255);
GlStateManager.disableLighting();
GlStateManager.disableFog();
framebuffer.unbindFramebuffer();
framebuffer.framebufferRender(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i);
GlStateManager.enableAlpha();
GlStateManager.alphaFunc(516, 0.1F);
this.updateDisplay();
}
示例10: drawSplashScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void drawSplashScreen(TextureManager textureManagerInstance) throws LWJGLException
{
ScaledResolution scaledresolution = new ScaledResolution(this);
int i = scaledresolution.getScaleFactor();
Framebuffer framebuffer = new Framebuffer(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i, true);
framebuffer.bindFramebuffer(false);
GlStateManager.matrixMode(5889);
GlStateManager.loadIdentity();
GlStateManager.ortho(0.0D, (double)scaledresolution.getScaledWidth(), (double)scaledresolution.getScaledHeight(), 0.0D, 1000.0D, 3000.0D);
GlStateManager.matrixMode(5888);
GlStateManager.loadIdentity();
GlStateManager.translate(0.0F, 0.0F, -2000.0F);
GlStateManager.disableLighting();
GlStateManager.disableFog();
GlStateManager.disableDepth();
GlStateManager.enableTexture2D();
InputStream inputstream = null;
try
{
inputstream = this.mcDefaultResourcePack.getInputStream(LOCATION_MOJANG_PNG);
this.mojangLogo = textureManagerInstance.getDynamicTextureLocation("logo", new DynamicTexture(ImageIO.read(inputstream)));
textureManagerInstance.bindTexture(this.mojangLogo);
}
catch (IOException ioexception)
{
LOGGER.error("Unable to load logo: {}", new Object[] {LOCATION_MOJANG_PNG, ioexception});
}
finally
{
IOUtils.closeQuietly(inputstream);
}
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos(0.0D, (double)this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
vertexbuffer.pos((double)this.displayWidth, (double)this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
vertexbuffer.pos((double)this.displayWidth, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
vertexbuffer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
tessellator.draw();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
int j = 256;
int k = 256;
this.draw((scaledresolution.getScaledWidth() - 256) / 2, (scaledresolution.getScaledHeight() - 256) / 2, 0, 0, 256, 256, 255, 255, 255, 255);
GlStateManager.disableLighting();
GlStateManager.disableFog();
framebuffer.unbindFramebuffer();
framebuffer.framebufferRender(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i);
GlStateManager.enableAlpha();
GlStateManager.alphaFunc(516, 0.1F);
this.updateDisplay();
}
示例11: drawSplashScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void drawSplashScreen(TextureManager textureManagerInstance) throws LWJGLException {
ScaledResolution scaledresolution = new ScaledResolution(this);
int i = scaledresolution.getScaleFactor();
Framebuffer framebuffer = new Framebuffer(scaledresolution.getScaledWidth() * i,
scaledresolution.getScaledHeight() * i, true);
framebuffer.bindFramebuffer(false);
GlStateManager.matrixMode(5889);
GlStateManager.loadIdentity();
GlStateManager.ortho(0.0D, (double) scaledresolution.getScaledWidth(),
(double) scaledresolution.getScaledHeight(), 0.0D, 1000.0D, 3000.0D);
GlStateManager.matrixMode(5888);
GlStateManager.loadIdentity();
GlStateManager.translate(0.0F, 0.0F, -2000.0F);
GlStateManager.disableLighting();
GlStateManager.disableFog();
GlStateManager.disableDepth();
GlStateManager.enableTexture2D();
InputStream inputstream = null;
try {
inputstream = this.mcDefaultResourcePack.getInputStream(locationMojangPng);
this.mojangLogo = textureManagerInstance.getDynamicTextureLocation("logo",
new DynamicTexture(ImageIO.read(inputstream)));
textureManagerInstance.bindTexture(this.mojangLogo);
} catch (IOException ioexception) {
logger.error((String) ("Unable to load logo: " + locationMojangPng), (Throwable) ioexception);
} finally {
IOUtils.closeQuietly(inputstream);
}
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
worldrenderer.pos(0.0D, (double) this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255)
.endVertex();
worldrenderer.pos((double) this.displayWidth, (double) this.displayHeight, 0.0D).tex(0.0D, 0.0D)
.color(255, 255, 255, 255).endVertex();
worldrenderer.pos((double) this.displayWidth, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
tessellator.draw();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
int j = 256;
int k = 256;
this.func_181536_a((scaledresolution.getScaledWidth() - j) / 2, (scaledresolution.getScaledHeight() - k) / 2, 0,
0, j, k, 255, 255, 255, 255);
GlStateManager.disableLighting();
GlStateManager.disableFog();
framebuffer.unbindFramebuffer();
framebuffer.framebufferRender(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i);
GlStateManager.enableAlpha();
GlStateManager.alphaFunc(516, 0.1F);
this.updateDisplay();
}
示例12: drawSplashScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void drawSplashScreen(TextureManager textureManagerInstance) throws LWJGLException
{
ScaledResolution scaledresolution = new ScaledResolution(this);
int i = scaledresolution.getScaleFactor();
Framebuffer framebuffer = new Framebuffer(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i, true);
framebuffer.bindFramebuffer(false);
GlStateManager.matrixMode(5889);
GlStateManager.loadIdentity();
GlStateManager.ortho(0.0D, (double)scaledresolution.getScaledWidth(), (double)scaledresolution.getScaledHeight(), 0.0D, 1000.0D, 3000.0D);
GlStateManager.matrixMode(5888);
GlStateManager.loadIdentity();
GlStateManager.translate(0.0F, 0.0F, -2000.0F);
GlStateManager.disableLighting();
GlStateManager.disableFog();
GlStateManager.disableDepth();
GlStateManager.enableTexture2D();
InputStream inputstream = null;
try
{
inputstream = this.mcDefaultResourcePack.getInputStream(LOCATION_MOJANG_PNG);
this.mojangLogo = textureManagerInstance.getDynamicTextureLocation("logo", new DynamicTexture(ImageIO.read(inputstream)));
textureManagerInstance.bindTexture(this.mojangLogo);
}
catch (IOException ioexception)
{
LOGGER.error("Unable to load logo: {}", new Object[] {LOCATION_MOJANG_PNG, ioexception});
}
finally
{
IOUtils.closeQuietly(inputstream);
}
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos(0.0D, (double)this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
vertexbuffer.pos((double)this.displayWidth, (double)this.displayHeight, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
vertexbuffer.pos((double)this.displayWidth, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
vertexbuffer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
tessellator.draw();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
int j = 256;
int k = 256;
this.draw((scaledresolution.getScaledWidth() - 256) / 2, (scaledresolution.getScaledHeight() - 256) / 2, 0, 0, 256, 256, 255, 255, 255, 255);
GlStateManager.disableLighting();
GlStateManager.disableFog();
framebuffer.unbindFramebuffer();
framebuffer.framebufferRender(scaledresolution.getScaledWidth() * i, scaledresolution.getScaledHeight() * i);
GlStateManager.enableAlpha();
GlStateManager.alphaFunc(516, 0.1F);
this.updateDisplay();
}
示例13: drawScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void drawScreen(int mouseXIn, int mouseYIn, float partialTicks)
{
if (this.visible)
{
this.mouseX = mouseXIn;
this.mouseY = mouseYIn;
this.drawBackground();
int i = this.getScrollBarX();
int j = i + 6;
this.bindAmountScrolled();
GlStateManager.disableLighting();
GlStateManager.disableFog();
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
int k = this.left + this.width / 2 - this.getListWidth() / 2 + 2;
int l = this.top + 4 - (int)this.amountScrolled;
if (this.hasListHeader)
{
this.drawListHeader(k, l, tessellator);
}
this.drawSelectionBox(k, l, mouseXIn, mouseYIn);
GlStateManager.disableDepth();
this.overlayBackground(0, this.top, 255, 255);
this.overlayBackground(this.bottom, this.height, 255, 255);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ZERO, GlStateManager.DestFactor.ONE);
GlStateManager.disableAlpha();
GlStateManager.shadeModel(7425);
GlStateManager.disableTexture2D();
int i1 = this.getMaxScroll();
if (i1 > 0)
{
int j1 = (this.bottom - this.top) * (this.bottom - this.top) / this.getContentHeight();
j1 = MathHelper.clamp(j1, 32, this.bottom - this.top - 8);
int k1 = (int)this.amountScrolled * (this.bottom - this.top - j1) / i1 + this.top;
if (k1 < this.top)
{
k1 = this.top;
}
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos((double)i, (double)this.bottom, 0.0D).tex(0.0D, 1.0D).color(0, 0, 0, 255).endVertex();
vertexbuffer.pos((double)j, (double)this.bottom, 0.0D).tex(1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
vertexbuffer.pos((double)j, (double)this.top, 0.0D).tex(1.0D, 0.0D).color(0, 0, 0, 255).endVertex();
vertexbuffer.pos((double)i, (double)this.top, 0.0D).tex(0.0D, 0.0D).color(0, 0, 0, 255).endVertex();
tessellator.draw();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos((double)i, (double)(k1 + j1), 0.0D).tex(0.0D, 1.0D).color(128, 128, 128, 255).endVertex();
vertexbuffer.pos((double)j, (double)(k1 + j1), 0.0D).tex(1.0D, 1.0D).color(128, 128, 128, 255).endVertex();
vertexbuffer.pos((double)j, (double)k1, 0.0D).tex(1.0D, 0.0D).color(128, 128, 128, 255).endVertex();
vertexbuffer.pos((double)i, (double)k1, 0.0D).tex(0.0D, 0.0D).color(128, 128, 128, 255).endVertex();
tessellator.draw();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos((double)i, (double)(k1 + j1 - 1), 0.0D).tex(0.0D, 1.0D).color(192, 192, 192, 255).endVertex();
vertexbuffer.pos((double)(j - 1), (double)(k1 + j1 - 1), 0.0D).tex(1.0D, 1.0D).color(192, 192, 192, 255).endVertex();
vertexbuffer.pos((double)(j - 1), (double)k1, 0.0D).tex(1.0D, 0.0D).color(192, 192, 192, 255).endVertex();
vertexbuffer.pos((double)i, (double)k1, 0.0D).tex(0.0D, 0.0D).color(192, 192, 192, 255).endVertex();
tessellator.draw();
}
this.renderDecorations(mouseXIn, mouseYIn);
GlStateManager.enableTexture2D();
GlStateManager.shadeModel(7424);
GlStateManager.enableAlpha();
GlStateManager.disableBlend();
}
}