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


Java GL14.glBlendFuncSeparate方法代碼示例

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


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

示例1: glBlendFunc

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public static void glBlendFunc(int sFactorRGB, int dFactorRGB, int sfactorAlpha, int dfactorAlpha)
{
    if (openGL14)
    {
        if (extBlendFuncSeparate)
        {
            EXTBlendFuncSeparate.glBlendFuncSeparateEXT(sFactorRGB, dFactorRGB, sfactorAlpha, dfactorAlpha);
        }
        else
        {
            GL14.glBlendFuncSeparate(sFactorRGB, dFactorRGB, sfactorAlpha, dfactorAlpha);
        }
    }
    else
    {
        GL11.glBlendFunc(sFactorRGB, dFactorRGB);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:19,代碼來源:OpenGlHelper.java

示例2: 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

示例3: clearFBOLayer

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
/**
 * Initialize layer FBO to receive GL primitives from a set of identical
 * symbolizers
 * 
 * @param primitive
 * @param opacity
 * @param currentSymbolizer
 * @throws GLException
 */
private void clearFBOLayer() throws GLException {
    GLTools.glCheckError("preparing next FBO Layer");
    GL30.glBindFramebuffer(GL30.GL_DRAW_FRAMEBUFFER, this.getLayerViewPanel().getGLCanvas().getFboId());
    GL11.glDrawBuffer(GL30.GL_COLOR_ATTACHMENT0);

    GLTools.glCheckError("bind frame buffer");

    // Blending mode in FBO drawing.
    GLTools.glCheckError("finalizing FBO initialization");
    GL11.glClearColor(0f, 0f, 0f, 0f);
    GLTools.glCheckError("finalizing FBO initialization");
    GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);

    GLTools.glCheckError("finalizing FBO initialization");
    glEnable(GL11.GL_BLEND);
    GLTools.glCheckError("finalizing FBO initialization");
    GL20.glBlendEquationSeparate(GL14.GL_FUNC_ADD, GL14.GL_MAX);
    GLTools.glCheckError("finalizing FBO initialization");
    GL14.glBlendFuncSeparate(GL11.GL_ONE, GL11.GL_ZERO, GL11.GL_ZERO, GL11.GL_ZERO);
    GL30.glBindFramebuffer(GL30.GL_DRAW_FRAMEBUFFER, 0);
    GLTools.glCheckError("finalizing FBO initialization");
}
 
開發者ID:IGNF,項目名稱:geoxygene,代碼行數:32,代碼來源:LwjglLayerRenderer.java

示例4: glBlendFunc

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public static void glBlendFunc(int p_148821_0_, int p_148821_1_, int p_148821_2_, int p_148821_3_)
{
    if (openGL14)
    {
        if (field_153211_u)
        {
            EXTBlendFuncSeparate.glBlendFuncSeparateEXT(p_148821_0_, p_148821_1_, p_148821_2_, p_148821_3_);
        }
        else
        {
            GL14.glBlendFuncSeparate(p_148821_0_, p_148821_1_, p_148821_2_, p_148821_3_);
        }
    }
    else
    {
        GL11.glBlendFunc(p_148821_0_, p_148821_1_);
    }
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:19,代碼來源:OpenGlHelper.java

示例5: glBlendFunc

import org.lwjgl.opengl.GL14; //導入方法依賴的package包/類
public static void glBlendFunc(int p_148821_0_, int p_148821_1_, int p_148821_2_, int p_148821_3_)
{
    if (openGL14)
    {
        GL14.glBlendFuncSeparate(p_148821_0_, p_148821_1_, p_148821_2_, p_148821_3_);
    }
    else
    {
        GL11.glBlendFunc(p_148821_0_, p_148821_1_);
    }
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:12,代碼來源:OpenGlHelper.java

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: glBlendFuncSeparate

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

示例12: glBlendFuncSeparate

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

示例13: glBlendFuncSeparate

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


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