Example usage for org.lwjgl.opengl GL14 glBlendEquation

List of usage examples for org.lwjgl.opengl GL14 glBlendEquation

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL14 glBlendEquation.

Prototype

public static void glBlendEquation(@NativeType("GLenum") int mode) 

Source Link

Document

Controls the blend equations used for per-fragment blending.

Usage

From source file:com.badlogic.gdx.backends.jglfw.JglfwGL20.java

License:Apache License

public void glBlendEquation(int mode) {
    GL14.glBlendEquation(mode);
}

From source file:com.dinasgames.engine.graphics.GL.java

public static void blendEquation(int colorEquation, int alphaEquation) {

    if (version >= 20) {
        GL20.glBlendEquationSeparate(colorEquation, alphaEquation);
        return;/*  w  w  w .  jav a2  s  .c om*/
    }

    if (version >= 14) {
        GL14.glBlendEquation(colorEquation);
        return;
    }

}

From source file:io.root.gfx.glutils.GL.java

License:Apache License

public static void glBlendEquation(int mode) {
    GL14.glBlendEquation(mode);
}

From source file:itdelatrisu.opsu.render.CurveRenderState.java

License:Open Source License

/**
 * Backup the current state of the relevant OpenGL state and change it to
 * what's needed to draw the curve./*w ww .ja  v a 2  s. co m*/
 */
private RenderState startRender() {
    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.texUnit = GL11.glGetInteger(GL13.GL_ACTIVE_TEXTURE);
    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, GL11.GL_CLAMP);

    GL20.glUseProgram(0);

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

    return state;
}

From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java

License:Open Source License

@Override
public void setBlendEquation(int mode) {
    try {/*www .j  av a 2s  .  c o m*/
        GL14.glBlendEquation(blendModeToGL[mode]);
    } catch (IllegalStateException e) {
        log.warn("VideoEngine: " + e.getMessage());
    }
}

From source file:net.smert.frameworkgl.opengl.OpenGL1.java

License:Apache License

public OpenGL1 setBlendingEquationAdd() {
    GL14.glBlendEquation(BlendEquations.ADD);
    return this;
}

From source file:net.smert.frameworkgl.opengl.OpenGL1.java

License:Apache License

public OpenGL1 setBlendingEquationMax() {
    GL14.glBlendEquation(BlendEquations.MAX);
    return this;
}

From source file:net.smert.frameworkgl.opengl.OpenGL1.java

License:Apache License

public OpenGL1 setBlendingEquationMin() {
    GL14.glBlendEquation(BlendEquations.MIN);
    return this;
}

From source file:net.smert.frameworkgl.opengl.OpenGL1.java

License:Apache License

public OpenGL1 setBlendingEquationReverseSubtract() {
    GL14.glBlendEquation(BlendEquations.REVERSE_SUBTRACT);
    return this;
}

From source file:net.smert.frameworkgl.opengl.OpenGL1.java

License:Apache License

public OpenGL1 setBlendingEquationSubtract() {
    GL14.glBlendEquation(BlendEquations.SUBTRACT);
    return this;
}