Example usage for com.badlogic.gdx.graphics GL20 GL_TEXTURE

List of usage examples for com.badlogic.gdx.graphics GL20 GL_TEXTURE

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics GL20 GL_TEXTURE.

Prototype

int GL_TEXTURE

To view the source code for com.badlogic.gdx.graphics GL20 GL_TEXTURE.

Click Source Link

Usage

From source file:mobi.shad.s3lib.gfx.effect.PostRender.java

License:Apache License

@Override
public void postRender() {

    sourceTexture = captureTexture.getResultTexture();
    if (blurSwitch) {
        processBlurFilter();/*from   ww w.  j a v a 2  s  . c  o m*/
    } else {
        captureTexture.end();
        sourceTexture = captureTexture.getResultTexture();
        destTexture = captureTexture.getResultTexture();
    }

    //
    // Draw result
    //
    S3.gl.glClearColor(0.0f, 0.0f, 0.0f, 1);
    S3.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

    if (blurSwitch || sepiaSwitch || vignetteSwitch || levelSwitch) {

        S3.gl.glEnable(GL20.GL_TEXTURE);
        S3Gfx.drawFlipMeshQuad(sourceTexture, destTexture, mixShader);

        //
        // Clear texture unit
        //
        S3.gl.glActiveTexture(GL20.GL_TEXTURE0);
        S3.gl.glDisable(GL20.GL_TEXTURE);
    } else {
        S3Gfx.drawFlipBackground(sourceTexture);
    }

    //      S3Gfx.drawBackground(sourceTexture, 0, 0, 300, 300);
    //      S3Gfx.drawBackground(destTexture, 300, 600, 0, 300);

}