/**
* Renders the skybox in the main menu
*/
private void renderSkybox(int mouseX, int mouseY, float partialTicks) {
this.mc.getFramebuffer().unbindFramebuffer();
GlStateManager.viewport(0, 0, 256, 256);
this.drawPanorama(mouseX, mouseY, partialTicks);
this.rotateAndBlurSkybox(partialTicks);
int i = 3;
CustomPanoramaProperties custompanoramaproperties = CustomPanorama.getCustomPanoramaProperties();
if (custompanoramaproperties != null) {
i = custompanoramaproperties.getBlur3();
}
for (int j = 0; j < i; ++j) {
this.rotateAndBlurSkybox(partialTicks);
this.rotateAndBlurSkybox(partialTicks);
}
this.mc.getFramebuffer().bindFramebuffer(true);
GlStateManager.viewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
float f2 = 120.0F / (float) (this.width > this.height ? this.width : this.height);
float f = (float) this.height * f2 / 256.0F;
float f1 = (float) this.width * f2 / 256.0F;
int k = this.width;
int l = this.height;
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
vertexbuffer.pos(0.0D, (double) l, (double) this.zLevel).tex((double) (0.5F - f), (double) (0.5F + f1))
.color(1.0F, 1.0F, 1.0F, 1.0F).endVertex();
vertexbuffer.pos((double) k, (double) l, (double) this.zLevel).tex((double) (0.5F - f), (double) (0.5F - f1))
.color(1.0F, 1.0F, 1.0F, 1.0F).endVertex();
vertexbuffer.pos((double) k, 0.0D, (double) this.zLevel).tex((double) (0.5F + f), (double) (0.5F - f1))
.color(1.0F, 1.0F, 1.0F, 1.0F).endVertex();
vertexbuffer.pos(0.0D, 0.0D, (double) this.zLevel).tex((double) (0.5F + f), (double) (0.5F + f1))
.color(1.0F, 1.0F, 1.0F, 1.0F).endVertex();
tessellator.draw();
}
GuiMainMenu.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Backmemed
作者:
评论列表
文章目录