本文整理匯總了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);
}
}
示例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);
}
示例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");
}
示例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_);
}
}
示例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_);
}
}
示例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);
}
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}