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


Java GlStateManager.colorMask方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.colorMask方法的典型用法代码示例。如果您正苦于以下问题:Java GlStateManager.colorMask方法的具体用法?Java GlStateManager.colorMask怎么用?Java GlStateManager.colorMask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.GlStateManager的用法示例。


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

示例1: setViewport

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void setViewport(int vx, int vy, int vw, int vh)
{
    GlStateManager.colorMask(true, true, true, true);

    if (isShadowPass)
    {
        GL11.glViewport(0, 0, shadowMapWidth, shadowMapHeight);
    }
    else
    {
        GL11.glViewport(0, 0, renderWidth, renderHeight);
        EXTFramebufferObject.glBindFramebufferEXT(36160, dfb);
        isRenderingDfb = true;
        GlStateManager.enableCull();
        GlStateManager.enableDepth();
        setDrawBuffers(drawBuffersNone);
        useProgram(2);
        checkGLError("beginRenderPass");
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:21,代码来源:Shaders.java

示例2: endRender

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void endRender()
{
    if (isShadowPass)
    {
        checkGLError("shadow endRender");
    }
    else
    {
        if (!isCompositeRendered)
        {
            renderCompositeFinal();
        }

        isRenderingWorld = false;
        GlStateManager.colorMask(true, true, true, true);
        useProgram(0);
        RenderHelper.disableStandardItemLighting();
        checkGLError("endRender end");
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:21,代码来源:Shaders.java

示例3: rotateAndBlurSkybox

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Rotate and blurs the skybox view in the main menu
 */
private void rotateAndBlurSkybox(float p_73968_1_)
{
    this.mc.getTextureManager().bindTexture(this.backgroundTexture);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
    GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
    GlStateManager.enableBlend();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GlStateManager.colorMask(true, true, true, false);
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
    GlStateManager.disableAlpha();
    int i = 3;

    for (int j = 0; j < i; ++j)
    {
        float f = 1.0F / (float)(j + 1);
        int k = this.width;
        int l = this.height;
        float f1 = (float)(j - i / 2) / 256.0F;
        worldrenderer.pos((double)k, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        worldrenderer.pos((double)k, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        worldrenderer.pos(0.0D, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        worldrenderer.pos(0.0D, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
    }

    tessellator.draw();
    GlStateManager.enableAlpha();
    GlStateManager.colorMask(true, true, true, true);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:35,代码来源:GuiMainMenu.java

示例4: renderMultipass

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderMultipass(Entity p_187054_1_, float p_187054_2_, float p_187054_3_, float p_187054_4_, float p_187054_5_, float p_187054_6_, float scale)
{
    GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.colorMask(false, false, false, false);
    this.noWater.render(scale);
    GlStateManager.colorMask(true, true, true, true);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:ModelBoat.java

示例5: rotateAndBlurSkybox

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void rotateAndBlurSkybox(float p_73968_1_)
{
    this.mc.getTextureManager().bindTexture(this.panoramaLoc);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
    GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
    GlStateManager.enableBlend();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    GlStateManager.colorMask(true, true, true, false);
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
    GlStateManager.disableAlpha();
    int i = 3;

    for (int j = 0; j < i; ++j)
    {
        float f = 1.0F / (float)(j + 1);
        int k = this.width;
        int l = this.height;
        float f1 = (float)(j - i / 2) / 256.0F;
        worldrenderer.pos((double)k, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        worldrenderer.pos((double)k, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 1.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        worldrenderer.pos(0.0D, 0.0D, (double)this.zLevel).tex((double)(1.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
        worldrenderer.pos(0.0D, (double)l, (double)this.zLevel).tex((double)(0.0F + f1), 0.0D).color(1.0F, 1.0F, 1.0F, f).endVertex();
    }

    tessellator.draw();
    GlStateManager.enableAlpha();
    GlStateManager.colorMask(true, true, true, true);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:32,代码来源:AccountScreen.java

示例6: drawScreen

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
    super.drawScreen(mouseX, mouseY, partialTicks);

    RenderHelper.enableGUIStandardItemLighting();
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)guiLeft, (float)guiTop, 0.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.enableRescaleNormal();
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 240.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

    for (int i1 = 0; i1 < this.containerInstrumentPlayer.inventorySlots.size(); i1++)
    {
        Slot slot = this.containerInstrumentPlayer.inventorySlots.get(i1);
        this.drawSlot(slot);

        if (this.isMouseOverSlot(slot, mouseX, mouseY) && slot.isEnabled())
        {
            GlStateManager.disableLighting();
            GlStateManager.disableDepth();
            int j1 = slot.xPos;
            int k1 = slot.yPos;
            GlStateManager.colorMask(true, true, true, false);
            this.drawGradientRect(j1, k1, j1 + 16, k1 + 16, -2130706433, -2130706433);
            GlStateManager.colorMask(true, true, true, true);
            GlStateManager.enableLighting();
            GlStateManager.enableDepth();
        }
    }

    RenderHelper.disableStandardItemLighting();
    GlStateManager.popMatrix();

}
 
开发者ID:iChun,项目名称:Clef,代码行数:37,代码来源:GuiPlayTrackBlock.java

示例7: framebufferRenderExt

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void framebufferRenderExt(int p_178038_1_, int p_178038_2_, boolean p_178038_3_)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        GlStateManager.colorMask(true, true, true, false);
        GlStateManager.disableDepth();
        GlStateManager.depthMask(false);
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        GlStateManager.ortho(0.0D, (double)p_178038_1_, (double)p_178038_2_, 0.0D, 1000.0D, 3000.0D);
        GlStateManager.matrixMode(5888);
        GlStateManager.loadIdentity();
        GlStateManager.translate(0.0F, 0.0F, -2000.0F);
        GlStateManager.viewport(0, 0, p_178038_1_, p_178038_2_);
        GlStateManager.enableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.disableAlpha();

        if (p_178038_3_)
        {
            GlStateManager.disableBlend();
            GlStateManager.enableColorMaterial();
        }

        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.bindFramebufferTexture();
        float f = (float)p_178038_1_;
        float f1 = (float)p_178038_2_;
        float f2 = (float)this.framebufferWidth / (float)this.framebufferTextureWidth;
        float f3 = (float)this.framebufferHeight / (float)this.framebufferTextureHeight;
        Tessellator tessellator = Tessellator.getInstance();
        WorldRenderer worldrenderer = tessellator.getWorldRenderer();
        worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
        worldrenderer.pos(0.0D, (double)f1, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
        worldrenderer.pos((double)f, (double)f1, 0.0D).tex((double)f2, 0.0D).color(255, 255, 255, 255).endVertex();
        worldrenderer.pos((double)f, 0.0D, 0.0D).tex((double)f2, (double)f3).color(255, 255, 255, 255).endVertex();
        worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double)f3).color(255, 255, 255, 255).endVertex();
        tessellator.draw();
        this.unbindFramebufferTexture();
        GlStateManager.depthMask(true);
        GlStateManager.colorMask(true, true, true, true);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:44,代码来源:Framebuffer.java

示例8: loadShader

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void loadShader(float p_148042_1_)
{
    this.preLoadShader();
    this.framebufferIn.unbindFramebuffer();
    float f = (float)this.framebufferOut.framebufferTextureWidth;
    float f1 = (float)this.framebufferOut.framebufferTextureHeight;
    GlStateManager.viewport(0, 0, (int)f, (int)f1);
    this.manager.addSamplerTexture("DiffuseSampler", this.framebufferIn);

    for (int i = 0; i < this.listAuxFramebuffers.size(); ++i)
    {
        this.manager.addSamplerTexture((String)this.listAuxNames.get(i), this.listAuxFramebuffers.get(i));
        this.manager.getShaderUniformOrDefault("AuxSize" + i).set((float)((Integer)this.listAuxWidths.get(i)).intValue(), (float)((Integer)this.listAuxHeights.get(i)).intValue());
    }

    this.manager.getShaderUniformOrDefault("ProjMat").set(this.projectionMatrix);
    this.manager.getShaderUniformOrDefault("InSize").set((float)this.framebufferIn.framebufferTextureWidth, (float)this.framebufferIn.framebufferTextureHeight);
    this.manager.getShaderUniformOrDefault("OutSize").set(f, f1);
    this.manager.getShaderUniformOrDefault("Time").set(p_148042_1_);
    Minecraft minecraft = Minecraft.getMinecraft();
    this.manager.getShaderUniformOrDefault("ScreenSize").set((float)minecraft.displayWidth, (float)minecraft.displayHeight);
    this.manager.useShader();
    this.framebufferOut.framebufferClear();
    this.framebufferOut.bindFramebuffer(false);
    GlStateManager.depthMask(false);
    GlStateManager.colorMask(true, true, true, true);
    Tessellator tessellator = Tessellator.getInstance();
    WorldRenderer worldrenderer = tessellator.getWorldRenderer();
    worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
    worldrenderer.pos(0.0D, (double)f1, 500.0D).color(255, 255, 255, 255).endVertex();
    worldrenderer.pos((double)f, (double)f1, 500.0D).color(255, 255, 255, 255).endVertex();
    worldrenderer.pos((double)f, 0.0D, 500.0D).color(255, 255, 255, 255).endVertex();
    worldrenderer.pos(0.0D, 0.0D, 500.0D).color(255, 255, 255, 255).endVertex();
    tessellator.draw();
    GlStateManager.depthMask(true);
    GlStateManager.colorMask(true, true, true, true);
    this.manager.endShader();
    this.framebufferOut.unbindFramebuffer();
    this.framebufferIn.unbindFramebufferTexture();

    for (Object object : this.listAuxFramebuffers)
    {
        if (object instanceof Framebuffer)
        {
            ((Framebuffer)object).unbindFramebufferTexture();
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:49,代码来源:Shader.java

示例9: drawPanorama

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的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

示例10: drawPanorama

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的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

示例11: rotateAndBlurSkybox

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
 * Rotate and blurs the skybox view in the main menu
 */
private void rotateAndBlurSkybox(float partialTicks) {
	this.mc.getTextureManager().bindTexture(this.backgroundTexture);
	GlStateManager.glTexParameteri(3553, 10241, 9729);
	GlStateManager.glTexParameteri(3553, 10240, 9729);
	GlStateManager.glCopyTexSubImage2D(3553, 0, 0, 0, 0, 0, 256, 256);
	GlStateManager.enableBlend();
	GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
			GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE,
			GlStateManager.DestFactor.ZERO);
	GlStateManager.colorMask(true, true, true, false);
	Tessellator tessellator = Tessellator.getInstance();
	VertexBuffer vertexbuffer = tessellator.getBuffer();
	vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
	GlStateManager.disableAlpha();
	int i = 3;
	int j = 3;
	CustomPanoramaProperties custompanoramaproperties = CustomPanorama.getCustomPanoramaProperties();

	if (custompanoramaproperties != null) {
		j = custompanoramaproperties.getBlur2();
	}

	for (int k = 0; k < j; ++k) {
		float f = 1.0F / (float) (k + 1);
		int l = this.width;
		int i1 = this.height;
		float f1 = (float) (k - 1) / 256.0F;
		vertexbuffer.pos((double) l, (double) i1, (double) this.zLevel).tex((double) (0.0F + f1), 1.0D)
				.color(1.0F, 1.0F, 1.0F, f).endVertex();
		vertexbuffer.pos((double) l, 0.0D, (double) this.zLevel).tex((double) (1.0F + f1), 1.0D)
				.color(1.0F, 1.0F, 1.0F, f).endVertex();
		vertexbuffer.pos(0.0D, 0.0D, (double) this.zLevel).tex((double) (1.0F + f1), 0.0D)
				.color(1.0F, 1.0F, 1.0F, f).endVertex();
		vertexbuffer.pos(0.0D, (double) i1, (double) this.zLevel).tex((double) (0.0F + f1), 0.0D)
				.color(1.0F, 1.0F, 1.0F, f).endVertex();
	}

	tessellator.draw();
	GlStateManager.enableAlpha();
	GlStateManager.colorMask(true, true, true, true);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:45,代码来源:GuiMainMenu.java

示例12: framebufferRenderExt

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void framebufferRenderExt(int width, int height, boolean p_178038_3_)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        GlStateManager.colorMask(true, true, true, false);
        GlStateManager.disableDepth();
        GlStateManager.depthMask(false);
        GlStateManager.matrixMode(5889);
        GlStateManager.loadIdentity();
        GlStateManager.ortho(0.0D, (double)width, (double)height, 0.0D, 1000.0D, 3000.0D);
        GlStateManager.matrixMode(5888);
        GlStateManager.loadIdentity();
        GlStateManager.translate(0.0F, 0.0F, -2000.0F);
        GlStateManager.viewport(0, 0, width, height);
        GlStateManager.enableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.disableAlpha();

        if (p_178038_3_)
        {
            GlStateManager.disableBlend();
            GlStateManager.enableColorMaterial();
        }

        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.bindFramebufferTexture();
        float f = (float)width;
        float f1 = (float)height;
        float f2 = (float)this.framebufferWidth / (float)this.framebufferTextureWidth;
        float f3 = (float)this.framebufferHeight / (float)this.framebufferTextureHeight;
        Tessellator tessellator = Tessellator.getInstance();
        VertexBuffer vertexbuffer = tessellator.getBuffer();
        vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
        vertexbuffer.pos(0.0D, (double)f1, 0.0D).tex(0.0D, 0.0D).color(255, 255, 255, 255).endVertex();
        vertexbuffer.pos((double)f, (double)f1, 0.0D).tex((double)f2, 0.0D).color(255, 255, 255, 255).endVertex();
        vertexbuffer.pos((double)f, 0.0D, 0.0D).tex((double)f2, (double)f3).color(255, 255, 255, 255).endVertex();
        vertexbuffer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double)f3).color(255, 255, 255, 255).endVertex();
        tessellator.draw();
        this.unbindFramebufferTexture();
        GlStateManager.depthMask(true);
        GlStateManager.colorMask(true, true, true, true);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:44,代码来源:Framebuffer.java

示例13: loadShader

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void loadShader(float p_148042_1_)
{
    this.preLoadShader();
    this.framebufferIn.unbindFramebuffer();
    float f = (float)this.framebufferOut.framebufferTextureWidth;
    float f1 = (float)this.framebufferOut.framebufferTextureHeight;
    GlStateManager.viewport(0, 0, (int)f, (int)f1);
    this.manager.addSamplerTexture("DiffuseSampler", this.framebufferIn);

    for (int i = 0; i < this.listAuxFramebuffers.size(); ++i)
    {
        this.manager.addSamplerTexture((String)this.listAuxNames.get(i), this.listAuxFramebuffers.get(i));
        this.manager.getShaderUniformOrDefault("AuxSize" + i).set((float)((Integer)this.listAuxWidths.get(i)).intValue(), (float)((Integer)this.listAuxHeights.get(i)).intValue());
    }

    this.manager.getShaderUniformOrDefault("ProjMat").set(this.projectionMatrix);
    this.manager.getShaderUniformOrDefault("InSize").set((float)this.framebufferIn.framebufferTextureWidth, (float)this.framebufferIn.framebufferTextureHeight);
    this.manager.getShaderUniformOrDefault("OutSize").set(f, f1);
    this.manager.getShaderUniformOrDefault("Time").set(p_148042_1_);
    Minecraft minecraft = Minecraft.getMinecraft();
    this.manager.getShaderUniformOrDefault("ScreenSize").set((float)minecraft.displayWidth, (float)minecraft.displayHeight);
    this.manager.useShader();
    this.framebufferOut.framebufferClear();
    this.framebufferOut.bindFramebuffer(false);
    GlStateManager.depthMask(false);
    GlStateManager.colorMask(true, true, true, true);
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_COLOR);
    vertexbuffer.pos(0.0D, (double)f1, 500.0D).color(255, 255, 255, 255).endVertex();
    vertexbuffer.pos((double)f, (double)f1, 500.0D).color(255, 255, 255, 255).endVertex();
    vertexbuffer.pos((double)f, 0.0D, 500.0D).color(255, 255, 255, 255).endVertex();
    vertexbuffer.pos(0.0D, 0.0D, 500.0D).color(255, 255, 255, 255).endVertex();
    tessellator.draw();
    GlStateManager.depthMask(true);
    GlStateManager.colorMask(true, true, true, true);
    this.manager.endShader();
    this.framebufferOut.unbindFramebuffer();
    this.framebufferIn.unbindFramebufferTexture();

    for (Object object : this.listAuxFramebuffers)
    {
        if (object instanceof Framebuffer)
        {
            ((Framebuffer)object).unbindFramebufferTexture();
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:49,代码来源:Shader.java


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