Example usage for javax.microedition.khronos.opengles GL10 GL_BLEND

List of usage examples for javax.microedition.khronos.opengles GL10 GL_BLEND

Introduction

In this page you can find the example usage for javax.microedition.khronos.opengles GL10 GL_BLEND.

Prototype

int GL_BLEND

To view the source code for javax.microedition.khronos.opengles GL10 GL_BLEND.

Click Source Link

Usage

From source file:eu.sathra.SathraActivity.java

@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
    if (!mWasInitiated) {
        // Enable Smooth Shading, default not really needed.
        gl.glShadeModel(GL10.GL_SMOOTH);
        // Depth buffer setup.
        gl.glClearDepthf(1.0f);/*from w w w.ja  va  2s.  com*/
        // Enables depth testing.
        gl.glEnable(GL10.GL_DEPTH_TEST);
        // The type of depth testing to do.
        gl.glDepthFunc(GL10.GL_LEQUAL);
        // Really nice perspective calculations.
        gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);

        gl.glEnable(GL10.GL_DITHER);
        gl.glEnable(GL10.GL_MULTISAMPLE);
        gl.glEnable(GL10.GL_BLEND);
        gl.glDisable(GL10.GL_CULL_FACE);

        mLastDrawTimestamp = System.currentTimeMillis();
    }

    Log.debug("Surface created");
}

From source file:com.watabou.noosa.Game.java

@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
    GLES20.glEnable(GL10.GL_BLEND);
    GLES20.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);

    GLES20.glEnable(GL10.GL_SCISSOR_TEST);

    paused = false;//  w  w  w .  j a  v  a2s .  com

    SystemText.invalidate();
    TextureCache.reload();

    if (scene != null) {
        scene.resume();
    }
}