當前位置: 首頁>>代碼示例>>Java>>正文


Java GL14.glBlendEquation方法代碼示例

本文整理匯總了Java中org.lwjgl.opengl.GL14.glBlendEquation方法的典型用法代碼示例。如果您正苦於以下問題:Java GL14.glBlendEquation方法的具體用法?Java GL14.glBlendEquation怎麽用?Java GL14.glBlendEquation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.lwjgl.opengl.GL14的用法示例。


在下文中一共展示了GL14.glBlendEquation方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: renderParticle

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
@Override
public void renderParticle(Tessellator t, float par2, float par3, float par4, float par5, float par6, float par7)
{
	Minecraft.getMinecraft().renderEngine.bindTexture(RivalRebels.etflameball);
	GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
	GL14.glBlendEquation(GL14.GL_FUNC_ADD);
	float f10 = 0.03F * particleScale;
	float f11 = (float) (prevPosX + (posX - prevPosX) * par2 - interpPosX);
	float f12 = (float) (prevPosY + (posY - prevPosY) * par2 - interpPosY);
	float f13 = (float) (prevPosZ + (posZ - prevPosZ) * par2 - interpPosZ);
	t.setColorRGBA_F(1, 1, 1, 1);
	float X = (sequence % 4) / 4f;
	float Y = (sequence - (sequence % 4)) / 16f;
	t.addVertexWithUV(f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10, X + 0.25f, Y + 0.25f);
	t.addVertexWithUV(f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10, X + 0.25f, Y);
	t.addVertexWithUV(f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10, X, Y);
	t.addVertexWithUV(f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10, X, Y + 0.25f);
}
 
開發者ID:rodolphito,項目名稱:Rival-Rebels-Mod,代碼行數:20,代碼來源:EntityDocileFlameFX.java

示例2: func_148109_a

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public void func_148109_a()
{
    if (!this.equals(field_148118_a))
    {
        if (field_148118_a == null || this.field_148119_h != field_148118_a.func_148111_b())
        {
            field_148118_a = this;

            if (this.field_148119_h)
            {
                GlStateManager.disableBlend();
                return;
            }

            GlStateManager.enableBlend();
        }

        GL14.glBlendEquation(this.field_148112_f);

        if (this.field_148113_g)
        {
            GlStateManager.tryBlendFuncSeparate(this.field_148116_b, this.field_148114_d, this.field_148117_c, this.field_148115_e);
        }
        else
        {
            GlStateManager.blendFunc(this.field_148116_b, this.field_148114_d);
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:30,代碼來源:JsonBlendingMode.java

示例3: func_148109_a

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public void func_148109_a()
{
    if (!this.equals(field_148118_a))
    {
        if (field_148118_a == null || this.field_148119_h != field_148118_a.func_148111_b())
        {
            field_148118_a = this;

            if (this.field_148119_h)
            {
                GL11.glDisable(GL11.GL_BLEND);
                return;
            }

            GL11.glEnable(GL11.GL_BLEND);
        }

        GL14.glBlendEquation(this.field_148112_f);

        if (this.field_148113_g)
        {
            GL14.glBlendFuncSeparate(this.field_148116_b, this.field_148114_d, this.field_148117_c, this.field_148115_e);
        }
        else
        {
            GL11.glBlendFunc(this.field_148116_b, this.field_148114_d);
        }
    }
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:30,代碼來源:JsonBlendingMode.java

示例4: saveRenderState

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
/**
 * Backup the current state of the relevant OpenGL state and change it to
 * what's needed to draw the curve.
 */
private RenderState saveRenderState() {
	RenderState state = new RenderState();
	state.smoothedPoly = GL11.glGetBoolean(GL11.GL_POLYGON_SMOOTH);
	state.blendEnabled = GL11.glGetBoolean(GL11.GL_BLEND);
	state.depthEnabled = GL11.glGetBoolean(GL11.GL_DEPTH_TEST);
	state.depthWriteEnabled = GL11.glGetBoolean(GL11.GL_DEPTH_WRITEMASK);
	state.texEnabled = GL11.glGetBoolean(GL11.GL_TEXTURE_2D);
	state.oldProgram = GL11.glGetInteger(GL20.GL_CURRENT_PROGRAM);
	state.oldArrayBuffer = GL11.glGetInteger(GL15.GL_ARRAY_BUFFER_BINDING);
	GL11.glDisable(GL11.GL_POLYGON_SMOOTH);
	GL11.glEnable(GL11.GL_BLEND);
	GL14.glBlendEquation(GL14.GL_FUNC_ADD);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
	GL11.glEnable(GL11.GL_DEPTH_TEST);
	GL11.glDepthMask(true);
	GL11.glDisable(GL11.GL_TEXTURE_2D);
	GL11.glEnable(GL11.GL_TEXTURE_1D);
	GL11.glBindTexture(GL11.GL_TEXTURE_1D, staticState.gradientTexture);
	GL11.glTexParameteri(GL11.GL_TEXTURE_1D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR_MIPMAP_LINEAR);
	GL11.glTexParameteri(GL11.GL_TEXTURE_1D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
	GL11.glTexParameteri(GL11.GL_TEXTURE_1D, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE);

	GL20.glUseProgram(0);

	GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);

	return state;
}
 
開發者ID:itdelatrisu,項目名稱:opsu,代碼行數:33,代碼來源:CurveRenderState.java

示例5: setBlendMode

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
/**
	 * Setzt den Blendmodus nach den Werten aus {@link Image}
	 * @param mode
	 */
	public static void setBlendMode(int mode)
	{
		if (blendMode == mode) return;

		blendMode = mode;
		switch (mode)
		{
			case Image.COMPOSITE_NOCHANGE:
				break;
			case Image.COMPOSITE_NORMAL:
				glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
				GL14.glBlendEquation(GL14.GL_FUNC_ADD);
				break;
			case Image.COMPOSITE_ADD:
				glBlendFunc(GL_ONE, GL_ONE);
				GL14.glBlendEquation(GL14.GL_FUNC_ADD);
				break;
			case Image.COMPOSITE_SUB:
				glBlendFunc(GL_ONE, GL_ONE);
				GL14.glBlendEquation(GL14.GL_FUNC_SUBTRACT);
				break;
			case Image.COMPOSITE_MUL:
				glBlendFunc(GL_DST_COLOR, GL_ZERO); // BlendEquation ist hier egal
				break;
			case Image.COMPOSITE_ABSOLUT:
				glBlendFunc(GL_SRC_ALPHA, GL_SRC_ALPHA);
				// GL14.glBlendEquation(GL14.GL_FUNC_ADD);
				break;
			case Image.COMPOSITE_OVERLAY:
				glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
				GL14.glBlendEquation(GL14.GL_FUNC_ADD);
				break;
			case Image.COMPOSITE_TEST:
//				glBlend
				glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
				GL14.glBlendEquation(GL14.GL_FUNC_ADD);
				break;
		}
	}
 
開發者ID:TheWhiteShadow3,項目名稱:cuina,代碼行數:44,代碼來源:GLCache.java

示例6: restore

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public static void restore()
{
	glColor4f(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, color.getAlpha() / 255f);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
	GL14.glBlendEquation(GL14.GL_FUNC_ADD);
	glMatrixMode(matrixMode);
	bindTexture(null);
}
 
開發者ID:TheWhiteShadow3,項目名稱:cuina,代碼行數:9,代碼來源:GLCache.java

示例7: glBlendEquation

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public static void glBlendEquation(int blendEquation)
{
    GL14.glBlendEquation(blendEquation);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:GlStateManager.java

示例8: renderFlame

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public void renderFlame(EntityFlameBall ell, double x, double y, double z, float yaw, float pitch)
{
	if (ell.ticksExisted < 3) return;
	GL11.glPushMatrix();
	GL11.glDepthMask(false);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_BLEND);
	// GL11.glBlendEquationSeparate(GL14.GL_FUNC_ADD, GL14.GL_FUNC_ADD);
	GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
	GL14.glBlendEquation(GL14.GL_FUNC_ADD);
	GL11.glColor4f(1f, 1f, 1f, 1f);
	Minecraft.getMinecraft().renderEngine.bindTexture(RivalRebels.etflameball);
	
	GL11.glPushMatrix();
	float X = (ell.sequence % 4) / 4f;
	float Y = (ell.sequence - (ell.sequence % 4)) / 16f;
	float size = 0.0500f * ell.ticksExisted;
	size *= size;
	Tessellator t = Tessellator.instance;
	GL11.glTranslated(x, y, z);
	GL11.glRotatef(180 - Minecraft.getMinecraft().thePlayer.rotationYaw, 0.0F, 1.0F, 0.0F);
	GL11.glRotatef(90 - Minecraft.getMinecraft().thePlayer.rotationPitch, 1.0F, 0.0F, 0.0F);
	GL11.glPushMatrix();
	GL11.glRotatef(ell.rotation, 0.0F, 1.0F, 0.0F);
	t.startDrawingQuads();
	t.setNormal(0.0F, 1.0F, 0.0F);
	t.addVertexWithUV(-size, 0, -size, X, Y);
	t.addVertexWithUV(size, 0, -size, X + 0.25f, Y);
	t.addVertexWithUV(size, 0, size, X + 0.25f, Y + 0.25f);
	t.addVertexWithUV(-size, 0, size, X, Y + 0.25f);
	t.draw();
	GL11.glPopMatrix();
	GL11.glPopMatrix();
	
	GL11.glEnable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glDepthMask(true);
	GL11.glPopMatrix();
}
 
開發者ID:rodolphito,項目名稱:Rival-Rebels-Mod,代碼行數:44,代碼來源:RenderFlame.java

示例9: renderFlame

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public void renderFlame(EntityFlameBall2 ell, double x, double y, double z, float yaw, float pitch)
{
	if (ell.ticksExisted < 3) return;
	GL11.glPushMatrix();
	GL11.glDepthMask(false);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_BLEND);
	// GL11.glBlendEquationSeparate(GL14.GL_FUNC_ADD, GL14.GL_FUNC_ADD);
	GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
	GL14.glBlendEquation(GL14.GL_FUNC_ADD);
	GL11.glColor4f(1f, 1f, 1f, 1f);
	Minecraft.getMinecraft().renderEngine.bindTexture(RivalRebels.etflameblue);
	
	GL11.glPushMatrix();
	float X = (ell.sequence % 4) / 4f;
	float Y = (ell.sequence - (ell.sequence % 4)) / 16f;
	float size = 0.070f * ell.ticksExisted;
	size *= size;
	if (size >= 0.3) size = 0.3f;
	Tessellator t = Tessellator.instance;
	GL11.glTranslated(x, y, z);
	GL11.glRotatef(180 - Minecraft.getMinecraft().thePlayer.rotationYaw, 0.0F, 1.0F, 0.0F);
	GL11.glRotatef(90 - Minecraft.getMinecraft().thePlayer.rotationPitch, 1.0F, 0.0F, 0.0F);
	GL11.glPushMatrix();
	GL11.glRotatef(ell.rotation, 0.0F, 1.0F, 0.0F);
	t.startDrawingQuads();
	t.setNormal(0.0F, 1.0F, 0.0F);
	t.addVertexWithUV(-size, 0, -size, X, Y);
	t.addVertexWithUV(size, 0, -size, X + 0.25f, Y);
	t.addVertexWithUV(size, 0, size, X + 0.25f, Y + 0.25f);
	t.addVertexWithUV(-size, 0, size, X, Y + 0.25f);
	t.draw();
	GL11.glPopMatrix();
	GL11.glPopMatrix();
	
	GL11.glEnable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glDepthMask(true);
	GL11.glPopMatrix();
}
 
開發者ID:rodolphito,項目名稱:Rival-Rebels-Mod,代碼行數:45,代碼來源:RenderFlameBlue.java

示例10: renderFlame

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public void renderFlame(EntityFlameBall1 ell, double x, double y, double z, float yaw, float pitch)
{
	if (ell.ticksExisted < 3) return;
	GL11.glPushMatrix();
	GL11.glDepthMask(false);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_BLEND);
	// GL11.glBlendEquationSeparate(GL14.GL_FUNC_ADD, GL14.GL_FUNC_ADD);
	GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
	GL14.glBlendEquation(GL14.GL_FUNC_ADD);
	GL11.glColor4f(1f, 1f, 1f, 1f);
	Minecraft.getMinecraft().renderEngine.bindTexture(RivalRebels.etflamebluered);
	
	GL11.glPushMatrix();
	float X = (ell.sequence % 4) / 4f;
	float Y = (ell.sequence - (ell.sequence % 4)) / 16f;
	float size = 0.0550f * ell.ticksExisted;
	size *= size;
	// if (size >= 0.5) size = 0.5f;
	size += 0.05;
	Tessellator t = Tessellator.instance;
	GL11.glTranslated(x, y, z);
	GL11.glRotatef(180 - Minecraft.getMinecraft().thePlayer.rotationYaw, 0.0F, 1.0F, 0.0F);
	GL11.glRotatef(90 - Minecraft.getMinecraft().thePlayer.rotationPitch, 1.0F, 0.0F, 0.0F);
	GL11.glPushMatrix();
	GL11.glRotatef(ell.rotation, 0.0F, 1.0F, 0.0F);
	t.startDrawingQuads();
	t.setNormal(0.0F, 1.0F, 0.0F);
	t.addVertexWithUV(-size, 0, -size, X, Y);
	t.addVertexWithUV(size, 0, -size, X + 0.25f, Y);
	t.addVertexWithUV(size, 0, size, X + 0.25f, Y + 0.25f);
	t.addVertexWithUV(-size, 0, size, X, Y + 0.25f);
	t.draw();
	GL11.glPopMatrix();
	GL11.glPopMatrix();
	
	GL11.glEnable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glDepthMask(true);
	GL11.glPopMatrix();
}
 
開發者ID:rodolphito,項目名稱:Rival-Rebels-Mod,代碼行數:46,代碼來源:RenderFlameRedBlue.java

示例11: renderFlame

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public void renderFlame(EntityFlameBallGreen ell, double x, double y, double z, float yaw, float pitch)
{
	if (ell.ticksExisted < 3) return;
	GL11.glPushMatrix();
	GL11.glDepthMask(false);
	GL11.glEnable(GL11.GL_TEXTURE_2D);
	GL11.glDisable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_BLEND);
	// GL11.glBlendEquationSeparate(GL14.GL_FUNC_ADD, GL14.GL_FUNC_ADD);
	GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
	GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
	GL14.glBlendEquation(GL14.GL_FUNC_ADD);
	GL11.glColor4f(1f, 1f, 1f, 1f);
	Minecraft.getMinecraft().renderEngine.bindTexture(RivalRebels.etflameballgreen);
	
	GL11.glPushMatrix();
	float X = (ell.sequence % 4) / 4f;
	float Y = (ell.sequence - (ell.sequence % 4)) / 16f;
	float size = 0.0500f * ell.ticksExisted;
	//size *= size;
	Tessellator t = Tessellator.instance;
	GL11.glTranslated(x, y, z);
	GL11.glRotatef(180 - Minecraft.getMinecraft().thePlayer.rotationYaw, 0.0F, 1.0F, 0.0F);
	GL11.glRotatef(90 - Minecraft.getMinecraft().thePlayer.rotationPitch, 1.0F, 0.0F, 0.0F);
	GL11.glPushMatrix();
	GL11.glRotatef(ell.rotation, 0.0F, 1.0F, 0.0F);
	t.startDrawingQuads();
	t.setNormal(0.0F, 1.0F, 0.0F);
	t.addVertexWithUV(-size, 0, -size, X, Y);
	t.addVertexWithUV(size, 0, -size, X + 0.25f, Y);
	t.addVertexWithUV(size, 0, size, X + 0.25f, Y + 0.25f);
	t.addVertexWithUV(-size, 0, size, X, Y + 0.25f);
	t.draw();
	GL11.glPopMatrix();
	GL11.glPopMatrix();
	
	GL11.glEnable(GL11.GL_LIGHTING);
	GL11.glEnable(GL11.GL_CULL_FACE);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glDepthMask(true);
	GL11.glPopMatrix();
}
 
開發者ID:rodolphito,項目名稱:Rival-Rebels-Mod,代碼行數:44,代碼來源:RenderFlameBallGreen.java

示例12: glBlendEquation

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
@Override
public void glBlendEquation(int mode) {
	GL14.glBlendEquation(mode);
}
 
開發者ID:surgeplay,項目名稱:glow,代碼行數:5,代碼來源:GLCore.java

示例13: glBlendEquation

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public void glBlendEquation (int mode) {
	GL14.glBlendEquation(mode);
}
 
開發者ID:Arcnor,項目名稱:gdx-backend-jglfw,代碼行數:4,代碼來源:JglfwGL20.java

示例14: glBlendEquation

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
@Override
public void glBlendEquation(int mode) {
  GL14.glBlendEquation(mode);
}
 
開發者ID:playn,項目名稱:playn,代碼行數:5,代碼來源:LWJGLGL20.java


注:本文中的org.lwjgl.opengl.GL14.glBlendEquation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。