当前位置: 首页>>代码示例>>Java>>正文


Java Project类代码示例

本文整理汇总了Java中org.lwjgl.util.glu.Project的典型用法代码示例。如果您正苦于以下问题:Java Project类的具体用法?Java Project怎么用?Java Project使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Project类属于org.lwjgl.util.glu包,在下文中一共展示了Project类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderCloudsCheck

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
private void renderCloudsCheck(RenderGlobal renderGlobalIn, float partialTicks, int pass)
{
    if (this.mc.gameSettings.func_181147_e() != 0)
    {
        this.mc.mcProfiler.endStartSection("clouds");
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * 4.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.pushMatrix();
        this.setupFog(0, partialTicks);
        renderGlobalIn.renderClouds(partialTicks, pass);
        GlStateManager.disableFog();
        GlStateManager.popMatrix();
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * MathHelper.SQRT_2);
        GlStateManager.matrixMode(5888);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:21,代码来源:EntityRenderer.java

示例2: renderCloudsCheck

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
private void renderCloudsCheck(RenderGlobal renderGlobalIn, float partialTicks, int pass)
{
    if (this.mc.gameSettings.renderDistanceChunks >= 4 && !Config.isCloudsOff() && Shaders.shouldRenderClouds(this.mc.gameSettings))
    {
        this.mc.mcProfiler.endStartSection("clouds");
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance * 4.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.pushMatrix();
        this.setupFog(0, partialTicks);
        renderGlobalIn.renderClouds(partialTicks, pass);
        GlStateManager.disableFog();
        GlStateManager.popMatrix();
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance);
        GlStateManager.matrixMode(5888);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:21,代码来源:EntityRenderer.java

示例3: renderCloudsCheck

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
private void renderCloudsCheck(RenderGlobal renderGlobalIn, float partialTicks, int pass) {
	if (this.mc.gameSettings.renderDistanceChunks >= 4 && !Config.isCloudsOff()) {
		this.mc.mcProfiler.endStartSection("clouds");
		GlStateManager.matrixMode(5889);
		GlStateManager.loadIdentity();
		Project.gluPerspective(this.getFOVModifier(partialTicks, true),
				(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.clipDistance * 4.0F);
		GlStateManager.matrixMode(5888);
		GlStateManager.pushMatrix();
		this.setupFog(0, partialTicks);
		renderGlobalIn.renderClouds(partialTicks, pass);
		GlStateManager.disableFog();
		GlStateManager.popMatrix();
		GlStateManager.matrixMode(5889);
		GlStateManager.loadIdentity();
		Project.gluPerspective(this.getFOVModifier(partialTicks, true),
				(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.clipDistance);
		GlStateManager.matrixMode(5888);
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:21,代码来源:EntityRenderer.java

示例4: renderCloudsCheck

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
private void renderCloudsCheck(RenderGlobal renderGlobalIn, float partialTicks, int pass, double p_180437_4_, double p_180437_6_, double p_180437_8_)
{
    if (this.mc.gameSettings.renderDistanceChunks >= 4 && !Config.isCloudsOff() && Shaders.shouldRenderClouds(this.mc.gameSettings))
    {
        this.mc.mcProfiler.endStartSection("clouds");
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance * 4.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.pushMatrix();
        this.setupFog(0, partialTicks);
        renderGlobalIn.renderClouds(partialTicks, pass, p_180437_4_, p_180437_6_, p_180437_8_);
        GlStateManager.disableFog();
        GlStateManager.popMatrix();
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance);
        GlStateManager.matrixMode(5888);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:21,代码来源:EntityRenderer.java

示例5: renderCloudsCheck

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
private void renderCloudsCheck(RenderGlobal renderGlobalIn, float partialTicks, int pass)
{
    if (this.mc.gameSettings.shouldRenderClouds() != 0)
    {
        this.mc.mcProfiler.endStartSection("clouds");
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * 4.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.pushMatrix();
        this.setupFog(0, partialTicks);
        renderGlobalIn.renderClouds(partialTicks, pass);
        GlStateManager.disableFog();
        GlStateManager.popMatrix();
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * MathHelper.SQRT_2);
        GlStateManager.matrixMode(5888);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:21,代码来源:EntityRenderer.java

示例6: renderHand

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
/**
 * Render player hand
 */
private void renderHand(float partialTicks, int xOffset)
{
    if (!this.debugView)
    {
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        float f = 0.07F;

        if (this.mc.gameSettings.anaglyph)
        {
            GlStateManager.translate((float)(-(xOffset * 2 - 1)) * f, 0.0F, 0.0F);
        }

        Project.gluPerspective(this.getFOVModifier(partialTicks, false), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * 2.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.loadIdentity();

        if (this.mc.gameSettings.anaglyph)
        {
            GlStateManager.translate((float)(xOffset * 2 - 1) * 0.1F, 0.0F, 0.0F);
        }

        GlStateManager.pushMatrix();
        this.hurtCameraEffect(partialTicks);

        if (this.mc.gameSettings.viewBobbing)
        {
            this.setupViewBobbing(partialTicks);
        }

        boolean flag = this.mc.getRenderViewEntity() instanceof EntityLivingBase && ((EntityLivingBase)this.mc.getRenderViewEntity()).isPlayerSleeping();

        if (this.mc.gameSettings.thirdPersonView == 0 && !flag && !this.mc.gameSettings.hideGUI && !this.mc.playerController.isSpectator())
        {
            this.enableLightmap();
            this.itemRenderer.renderItemInFirstPerson(partialTicks);
            this.disableLightmap();
        }

        GlStateManager.popMatrix();

        if (this.mc.gameSettings.thirdPersonView == 0 && !flag)
        {
            this.itemRenderer.renderOverlays(partialTicks);
            this.hurtCameraEffect(partialTicks);
        }

        if (this.mc.gameSettings.viewBobbing)
        {
            this.setupViewBobbing(partialTicks);
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:57,代码来源:EntityRenderer.java

示例7: drawPanorama

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
private void drawPanorama(int p_73970_1_, int p_73970_2_, float p_73970_3_) {
    Tessellator var4 = Tessellator.getInstance();
    WorldRenderer var5 = var4.getWorldRenderer();
    GlStateManager.matrixMode((int)5889);
    GlStateManager.pushMatrix();
    GlStateManager.loadIdentity();
    Project.gluPerspective((float)120.0f, (float)1.0f, (float)0.05f, (float)10.0f);
    GlStateManager.matrixMode((int)5888);
    GlStateManager.pushMatrix();
    GlStateManager.loadIdentity();
    GlStateManager.color((float)1.0f, (float)1.0f, (float)1.0f, (float)1.0f);
    GlStateManager.rotate((float)180.0f, (float)1.0f, (float)0.0f, (float)0.0f);
    GlStateManager.rotate((float)90.0f, (float)0.0f, (float)0.0f, (float)1.0f);
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.disableCull();
    GlStateManager.depthMask((boolean)false);
    GlStateManager.tryBlendFuncSeparate((int)770, (int)771, (int)1, (int)0);
    int var6 = 8;
    int var7 = 0;
    while (var7 < var6 * var6) {
        GlStateManager.pushMatrix();
        float var8 = ((float)(var7 % var6) / (float)var6 - 0.5f) / 64.0f;
        float var9 = ((float)(var7 / var6) / (float)var6 - 0.5f) / 64.0f;
        float var10 = 0.0f;
        GlStateManager.translate((float)var8, (float)var9, (float)var10);
        GlStateManager.rotate((float)(MathHelper.sin((float)((this.panoramaTimer + p_73970_3_) / 400.0f)) * 25.0f + 20.0f), (float)1.0f, (float)0.0f, (float)0.0f);
        GlStateManager.rotate((float)((- this.panoramaTimer + p_73970_3_) * 0.1f), (float)0.0f, (float)1.0f, (float)0.0f);
        int var11 = 0;
        while (var11 < 6) {
            GlStateManager.pushMatrix();
            if (var11 == 1) {
                GlStateManager.rotate((float)90.0f, (float)0.0f, (float)1.0f, (float)0.0f);
            }
            if (var11 == 2) {
                GlStateManager.rotate((float)180.0f, (float)0.0f, (float)1.0f, (float)0.0f);
            }
            if (var11 == 3) {
                GlStateManager.rotate((float)-90.0f, (float)0.0f, (float)1.0f, (float)0.0f);
            }
            if (var11 == 4) {
                GlStateManager.rotate((float)90.0f, (float)1.0f, (float)0.0f, (float)0.0f);
            }
            if (var11 == 5) {
                GlStateManager.rotate((float)-90.0f, (float)1.0f, (float)0.0f, (float)0.0f);
            }
            this.mc.getTextureManager().bindTexture(titlePanoramaPaths[var11]);
            var5.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
            int l = 255 / (var11 + 1);
            float f3 = 0.0F;
            var5.pos(-1.0D, -1.0D, 1.0D).tex(0.0D, 0.0D).color(255, 255, 255, l).endVertex();
            var5.pos(1.0D, -1.0D, 1.0D).tex(1.0D, 0.0D).color(255, 255, 255, l).endVertex();
            var5.pos(1.0D, 1.0D, 1.0D).tex(1.0D, 1.0D).color(255, 255, 255, l).endVertex();
            var5.pos(-1.0D, 1.0D, 1.0D).tex(0.0D, 1.0D).color(255, 255, 255, l).endVertex();
            var4.draw();
            GlStateManager.popMatrix();
            ++var11;
        }
        GlStateManager.popMatrix();
        GlStateManager.colorMask((boolean)true, (boolean)true, (boolean)true, (boolean)false);
        ++var7;
    }
    var5.setTranslation(0.0, 0.0, 0.0);
    GlStateManager.colorMask((boolean)true, (boolean)true, (boolean)true, (boolean)true);
    GlStateManager.matrixMode((int)5889);
    GlStateManager.popMatrix();
    GlStateManager.matrixMode((int)5888);
    GlStateManager.popMatrix();
    GlStateManager.depthMask((boolean)true);
    GlStateManager.enableCull();
    GlStateManager.enableDepth();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:73,代码来源:AccountScreen.java

示例8: drawPanorama

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
private void drawPanorama(int p_73970_1_, int p_73970_2_, float p_73970_3_) {
	Tessellator tessellator = Tessellator.getInstance();
	WorldRenderer worldrenderer = tessellator.getWorldRenderer();
	GlStateManager.matrixMode(5889);
	GlStateManager.pushMatrix();
	GlStateManager.loadIdentity();
	Project.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
	GlStateManager.matrixMode(5888);
	GlStateManager.pushMatrix();
	GlStateManager.loadIdentity();
	GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
	GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
	GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
	GlStateManager.enableBlend();
	GlStateManager.disableAlpha();
	GlStateManager.disableCull();
	GlStateManager.depthMask(false);
	GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
	int i = 8;

	for (int j = 0; j < i * i; ++j) {
		GlStateManager.pushMatrix();
		float f = ((float) (j % i) / (float) i - 0.5F) / 64.0F;
		float f1 = ((float) (j / i) / (float) i - 0.5F) / 64.0F;
		float f2 = 0.0F;
		GlStateManager.translate(f, f1, f2);
		GlStateManager.rotate(MathHelper.sin(((float) this.panoramaTimer + p_73970_3_) / 400.0F) * 25.0F + 20.0F,
				1.0F, 0.0F, 0.0F);
		GlStateManager.rotate(-((float) this.panoramaTimer + p_73970_3_) * 0.1F, 0.0F, 1.0F, 0.0F);

		for (int k = 0; k < 6; ++k) {
			GlStateManager.pushMatrix();

			if (k == 1) {
				GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
			}

			if (k == 2) {
				GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
			}

			if (k == 3) {
				GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
			}

			if (k == 4) {
				GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
			}

			if (k == 5) {
				GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);
			}

			this.mc.getTextureManager().bindTexture(titlePanoramaPaths[k]);
			worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
			int l = 255 / (j + 1);
			float f3 = 0.0F;
			worldrenderer.pos(-1.0D, -1.0D, 1.0D).tex(0.0D, 0.0D).color(255, 255, 255, l).endVertex();
			worldrenderer.pos(1.0D, -1.0D, 1.0D).tex(1.0D, 0.0D).color(255, 255, 255, l).endVertex();
			worldrenderer.pos(1.0D, 1.0D, 1.0D).tex(1.0D, 1.0D).color(255, 255, 255, l).endVertex();
			worldrenderer.pos(-1.0D, 1.0D, 1.0D).tex(0.0D, 1.0D).color(255, 255, 255, l).endVertex();
			tessellator.draw();
			GlStateManager.popMatrix();
		}

		GlStateManager.popMatrix();
		GlStateManager.colorMask(true, true, true, false);
	}

	worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
	GlStateManager.colorMask(true, true, true, true);
	GlStateManager.matrixMode(5889);
	GlStateManager.popMatrix();
	GlStateManager.matrixMode(5888);
	GlStateManager.popMatrix();
	GlStateManager.depthMask(true);
	GlStateManager.enableCull();
	GlStateManager.enableDepth();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:80,代码来源:GuiLoading.java

示例9: renderHand

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
/**
 * Render player hand
 */
private void renderHand(float partialTicks, int xOffset) {
	if (!this.debugView) {
		GlStateManager.matrixMode(5889);
		GlStateManager.loadIdentity();
		float f = 0.07F;

		if (this.mc.gameSettings.anaglyph) {
			GlStateManager.translate((float) (-(xOffset * 2 - 1)) * f, 0.0F, 0.0F);
		}

		Project.gluPerspective(this.getFOVModifier(partialTicks, false),
				(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * 2.0F);
		GlStateManager.matrixMode(5888);
		GlStateManager.loadIdentity();

		if (this.mc.gameSettings.anaglyph) {
			GlStateManager.translate((float) (xOffset * 2 - 1) * 0.1F, 0.0F, 0.0F);
		}

		GlStateManager.pushMatrix();
		this.hurtCameraEffect(partialTicks);

		if (this.mc.gameSettings.viewBobbing) {
			this.setupViewBobbing(partialTicks);
		}

		boolean flag = this.mc.getRenderViewEntity() instanceof EntityLivingBase
				&& ((EntityLivingBase) this.mc.getRenderViewEntity()).isPlayerSleeping();

		if (this.mc.gameSettings.thirdPersonView == 0 && !flag && !this.mc.gameSettings.hideGUI
				&& !this.mc.playerController.isSpectator()) {
			this.enableLightmap();
			this.itemRenderer.renderItemInFirstPerson(partialTicks);
			this.disableLightmap();
		}

		GlStateManager.popMatrix();

		if (this.mc.gameSettings.thirdPersonView == 0 && !flag) {
			this.itemRenderer.renderOverlays(partialTicks);
			this.hurtCameraEffect(partialTicks);
		}

		if (this.mc.gameSettings.viewBobbing) {
			this.setupViewBobbing(partialTicks);
		}
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:52,代码来源:EntityRenderer.java

示例10: renderHand

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
public void renderHand(float p_renderHand_1_, int p_renderHand_2_, boolean p_renderHand_3_, boolean p_renderHand_4_, boolean p_renderHand_5_)
{
    if (!this.debugView)
    {
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        float f = 0.07F;

        if (this.mc.gameSettings.anaglyph)
        {
            GlStateManager.translate((float)(-(p_renderHand_2_ * 2 - 1)) * 0.07F, 0.0F, 0.0F);
        }

        if (Config.isShaders())
        {
            Shaders.applyHandDepth();
        }

        Project.gluPerspective(this.getFOVModifier(p_renderHand_1_, false), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * 2.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.loadIdentity();

        if (this.mc.gameSettings.anaglyph)
        {
            GlStateManager.translate((float)(p_renderHand_2_ * 2 - 1) * 0.1F, 0.0F, 0.0F);
        }

        boolean flag = false;

        if (p_renderHand_3_)
        {
            GlStateManager.pushMatrix();
            this.hurtCameraEffect(p_renderHand_1_);

            if (this.mc.gameSettings.viewBobbing)
            {
                this.setupViewBobbing(p_renderHand_1_);
            }

            flag = this.mc.getRenderViewEntity() instanceof EntityLivingBase && ((EntityLivingBase)this.mc.getRenderViewEntity()).isPlayerSleeping();
            boolean flag1 = !ReflectorForge.renderFirstPersonHand(this.mc.renderGlobal, p_renderHand_1_, p_renderHand_2_);

            if (flag1 && this.mc.gameSettings.thirdPersonView == 0 && !flag && !this.mc.gameSettings.hideGUI && !this.mc.playerController.isSpectator())
            {
                this.enableLightmap();

                if (Config.isShaders())
                {
                    ShadersRender.renderItemFP(this.itemRenderer, p_renderHand_1_, p_renderHand_5_);
                }
                else
                {
                    this.itemRenderer.renderItemInFirstPerson(p_renderHand_1_);
                }

                this.disableLightmap();
            }

            GlStateManager.popMatrix();
        }

        if (!p_renderHand_4_)
        {
            return;
        }

        this.disableLightmap();

        if (this.mc.gameSettings.thirdPersonView == 0 && !flag)
        {
            this.itemRenderer.renderOverlays(p_renderHand_1_);
            this.hurtCameraEffect(p_renderHand_1_);
        }

        if (this.mc.gameSettings.viewBobbing)
        {
            this.setupViewBobbing(p_renderHand_1_);
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:81,代码来源:EntityRenderer.java

示例11: setupCameraTransform

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
/**
 * sets up projection, view effects, camera position/rotation
 */
private void setupCameraTransform(float partialTicks, int pass)
{
    this.farPlaneDistance = (float)(this.mc.gameSettings.renderDistanceChunks * 16);
    GlStateManager.matrixMode(5889);
    GlStateManager.loadIdentity();
    float f = 0.07F;

    if (this.mc.gameSettings.anaglyph)
    {
        GlStateManager.translate((float)(-(pass * 2 - 1)) * 0.07F, 0.0F, 0.0F);
    }

    if (this.cameraZoom != 1.0D)
    {
        GlStateManager.translate((float)this.cameraYaw, (float)(-this.cameraPitch), 0.0F);
        GlStateManager.scale(this.cameraZoom, this.cameraZoom, 1.0D);
    }

    Project.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * MathHelper.SQRT_2);
    GlStateManager.matrixMode(5888);
    GlStateManager.loadIdentity();

    if (this.mc.gameSettings.anaglyph)
    {
        GlStateManager.translate((float)(pass * 2 - 1) * 0.1F, 0.0F, 0.0F);
    }

    this.hurtCameraEffect(partialTicks);

    if (this.mc.gameSettings.viewBobbing)
    {
        this.setupViewBobbing(partialTicks);
    }

    float f1 = this.mc.thePlayer.prevTimeInPortal + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * partialTicks;

    if (f1 > 0.0F)
    {
        int i = 20;

        if (this.mc.thePlayer.isPotionActive(MobEffects.NAUSEA))
        {
            i = 7;
        }

        float f2 = 5.0F / (f1 * f1 + 5.0F) - f1 * 0.04F;
        f2 = f2 * f2;
        GlStateManager.rotate(((float)this.rendererUpdateCount + partialTicks) * (float)i, 0.0F, 1.0F, 1.0F);
        GlStateManager.scale(1.0F / f2, 1.0F, 1.0F);
        GlStateManager.rotate(-((float)this.rendererUpdateCount + partialTicks) * (float)i, 0.0F, 1.0F, 1.0F);
    }

    this.orientCamera(partialTicks);

    if (this.debugView)
    {
        switch (this.debugViewDirection)
        {
            case 0:
                GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
                break;
            case 1:
                GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
                break;
            case 2:
                GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
                break;
            case 3:
                GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
                break;
            case 4:
                GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:79,代码来源:EntityRenderer.java

示例12: renderHand

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
/**
 * Render player hand
 */
private void renderHand(float partialTicks, int pass)
{
    if (!this.debugView)
    {
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        float f = 0.07F;

        if (this.mc.gameSettings.anaglyph)
        {
            GlStateManager.translate((float)(-(pass * 2 - 1)) * 0.07F, 0.0F, 0.0F);
        }

        Project.gluPerspective(this.getFOVModifier(partialTicks, false), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * 2.0F);
        GlStateManager.matrixMode(5888);
        GlStateManager.loadIdentity();

        if (this.mc.gameSettings.anaglyph)
        {
            GlStateManager.translate((float)(pass * 2 - 1) * 0.1F, 0.0F, 0.0F);
        }

        GlStateManager.pushMatrix();
        this.hurtCameraEffect(partialTicks);

        if (this.mc.gameSettings.viewBobbing)
        {
            this.setupViewBobbing(partialTicks);
        }

        boolean flag = this.mc.getRenderViewEntity() instanceof EntityLivingBase && ((EntityLivingBase)this.mc.getRenderViewEntity()).isPlayerSleeping();

        if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(mc.renderGlobal, partialTicks, pass))
        if (this.mc.gameSettings.thirdPersonView == 0 && !flag && !this.mc.gameSettings.hideGUI && !this.mc.playerController.isSpectator())
        {
            this.enableLightmap();
            this.itemRenderer.renderItemInFirstPerson(partialTicks);
            this.disableLightmap();
        }

        GlStateManager.popMatrix();

        if (this.mc.gameSettings.thirdPersonView == 0 && !flag)
        {
            this.itemRenderer.renderOverlays(partialTicks);
            this.hurtCameraEffect(partialTicks);
        }

        if (this.mc.gameSettings.viewBobbing)
        {
            this.setupViewBobbing(partialTicks);
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:58,代码来源:EntityRenderer.java

示例13: renderHand

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
private void renderHand(float p_78476_1_, int p_78476_2_)
{
    if (this.debugViewDirection <= 0)
    {
        GL11.glMatrixMode(GL11.GL_PROJECTION);
        GL11.glLoadIdentity();
        float var3 = 0.07F;

        if (this.mc.gameSettings.anaglyph)
        {
            GL11.glTranslatef((float)(-(p_78476_2_ * 2 - 1)) * var3, 0.0F, 0.0F);
        }

        if (this.cameraZoom != 1.0D)
        {
            GL11.glTranslatef((float)this.cameraYaw, (float)(-this.cameraPitch), 0.0F);
            GL11.glScaled(this.cameraZoom, this.cameraZoom, 1.0D);
        }

        Project.gluPerspective(this.getFOVModifier(p_78476_1_, false), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.farPlaneDistance * 2.0F);

        if (this.mc.playerController.enableEverythingIsScrewedUpMode())
        {
            float var4 = 0.6666667F;
            GL11.glScalef(1.0F, var4, 1.0F);
        }

        GL11.glMatrixMode(GL11.GL_MODELVIEW);
        GL11.glLoadIdentity();

        if (this.mc.gameSettings.anaglyph)
        {
            GL11.glTranslatef((float)(p_78476_2_ * 2 - 1) * 0.1F, 0.0F, 0.0F);
        }

        GL11.glPushMatrix();
        this.hurtCameraEffect(p_78476_1_);

        if (this.mc.gameSettings.viewBobbing)
        {
            this.setupViewBobbing(p_78476_1_);
        }

        if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping() && !this.mc.gameSettings.hideGUI && !this.mc.playerController.enableEverythingIsScrewedUpMode())
        {
            this.enableLightmap((double)p_78476_1_);
            this.itemRenderer.renderItemInFirstPerson(p_78476_1_);
            this.disableLightmap((double)p_78476_1_);
        }

        GL11.glPopMatrix();

        if (this.mc.gameSettings.thirdPersonView == 0 && !this.mc.renderViewEntity.isPlayerSleeping())
        {
            this.itemRenderer.renderOverlays(p_78476_1_);
            this.hurtCameraEffect(p_78476_1_);
        }

        if (this.mc.gameSettings.viewBobbing)
        {
            this.setupViewBobbing(p_78476_1_);
        }
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:65,代码来源:EntityRenderer.java

示例14: setupRendering

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
/**
 * Sets up 3d projection, shadowing, skybox, all that good stuff.
 */
private void setupRendering(Camera cam, long time) {
	//sets up the camera projection and position
	GlStateManager.matrixMode(GL_PROJECTION);
       GlStateManager.pushMatrix();
       GlStateManager.loadIdentity();
       Project.gluPerspective(mc.gameSettings.fovSetting, (float)mc.displayWidth / mc.displayHeight, 0.001F, 50000);
       
       GL11.glRotatef((float)cam.rot.y, 1F, 0F, 0F);
       GL11.glRotatef((float)cam.rot.x, 0F, 1F, 0F);
       GL11.glRotatef((float)cam.rot.z, 0F, 0F, 1F);
       
       GL11.glTranslatef((float)-cam.pos.x, (float)-cam.pos.y, (float)-cam.pos.z);
       //sets up the model space
       GlStateManager.matrixMode(GL_MODELVIEW);
       GlStateManager.pushMatrix();
       GlStateManager.loadIdentity();
       //glScalef(0.6f, 1f, 0.6f);
       //GL11.glRotatef(-time * following.getOrbit().getRotation(), 0, 1, 0);
       
       //enables depth
       glEnable(GL_DEPTH_TEST);
       GlStateManager.enableAlpha();
       GlStateManager.enableBlend();
       
       GlStateManager.pushMatrix();
       
       renderSkybox(cam.pos);
       
       //sets up shadowing
       GlStateManager.enableLighting();
       GlStateManager.enableLight(0);
       
       GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, setColorBuffer(0f, 0f, 0f, 1f));
       GL11.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, setColorBuffer(0.6f, 0.6f, 0.6f, 1.0F));
       GL11.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
       GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, setColorBuffer(0f, 0f, 0f, 1.0F));
       
       GlStateManager.shadeModel(GL_SMOOTH);
       GL11.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(0f, 0f, 0f, 1.0F));
}
 
开发者ID:TEAMModding,项目名称:FutureCraft,代码行数:44,代码来源:SpaceRenderer.java

示例15: drawPanorama

import org.lwjgl.util.glu.Project; //导入依赖的package包/类
/**
 * Draws the main menu panorama
 */
private void drawPanorama(float partialTicks) {
	int panoramaTimer = (useGlobalPanoramaTimer ? LaminateInternal.globalPanoramaTimer : this.panoramaTimer);
	
	TessellatorAccess tess = LaminateInternal.tess();
	GL.matrixMode(5889);
	GL.pushMatrix();
	GL.loadIdentity();
	Project.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
	GL.matrixMode(5888);
	GL.pushMatrix();
	GL.loadIdentity();
	GL.color(1.0F, 1.0F, 1.0F, 1.0F);
	GL.rotate(180.0F, 1.0F, 0.0F, 0.0F);
	GL.rotate(90.0F, 0.0F, 0.0F, 1.0F);
	GL.enableBlend();
	GL.disableAlpha();
	GL.disableCull();
	GL.depthMask(false);
	GL.tryBlendFuncSeparate(770, 771, 1, 0);
	int i = 8;

	for (int j = 0; j < i * i; ++j) {
		GL.pushMatrix();
		float f = ((float) (j % i) / (float) i - 0.5F) / 64.0F;
		float f1 = ((float) (j / i) / (float) i - 0.5F) / 64.0F;
		float f2 = 0.0F;
		GL.translate(f, f1, f2);
		GL.rotate(MathHelper.sin((panoramaTimer + partialTicks) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
		GL.rotate(-(panoramaTimer + partialTicks) * 0.1F, 0.0F, 1.0F, 0.0F);

		for (int k = 0; k < 6; ++k) {
			GL.pushMatrix();

			if (k == 1) {
				GL.rotate(90.0F, 0.0F, 1.0F, 0.0F);
			}

			if (k == 2) {
				GL.rotate(180.0F, 0.0F, 1.0F, 0.0F);
			}

			if (k == 3) {
				GL.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
			}

			if (k == 4) {
				GL.rotate(90.0F, 1.0F, 0.0F, 0.0F);
			}

			if (k == 5) {
				GL.rotate(-90.0F, 1.0F, 0.0F, 0.0F);
			}

			Minecraft.getMinecraft().getTextureManager().bindTexture(panoramaPaths[k]);
			tess.begin(GL11.GL_QUADS, TessellatorAccess.Format.POSITION_TEX_COLOR);
			int l = 255 / (j + 1);
			tess.pos(-1.0D, -1.0D, 1.0D).tex(0.0D, 0.0D).color(255, 255, 255, l).endVertex();
			tess.pos(1.0D, -1.0D, 1.0D).tex(1.0D, 0.0D).color(255, 255, 255, l).endVertex();
			tess.pos(1.0D, 1.0D, 1.0D).tex(1.0D, 1.0D).color(255, 255, 255, l).endVertex();
			tess.pos(-1.0D, 1.0D, 1.0D).tex(0.0D, 1.0D).color(255, 255, 255, l).endVertex();
			tess.draw();
			GL.popMatrix();
		}

		GL.popMatrix();
		GL.colorMask(true, true, true, false);
	}

	GL.colorMask(true, true, true, true);
	GL.matrixMode(5889);
	GL.popMatrix();
	GL.matrixMode(5888);
	GL.popMatrix();
	GL.depthMask(true);
	GL.enableCull();
	GL.enableDepth();
}
 
开发者ID:elytra,项目名称:Laminate,代码行数:81,代码来源:PanoramaShadowbox.java


注:本文中的org.lwjgl.util.glu.Project类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。