Project

General

Profile

« Previous | Next » 

Revision 194ab46f

Added by Leszek Koltunski over 7 years ago

Try using OpenGL ES 3.0 everywhere (but if device does not support it, try creating 2.0 context - this is important because of the emulator!)

View differences:

src/main/java/org/distorted/library/Distorted.java
21 21

  
22 22
import android.content.Context;
23 23
import android.content.res.Resources;
24
import android.opengl.GLES20;
24
import android.opengl.GLES30;
25 25
import org.distorted.library.program.*;
26 26

  
27 27
import java.io.InputStream;
......
113 113
    {
114 114
    final Resources resources = context.getResources();
115 115

  
116
    GLES20.glDepthFunc(GLES20.GL_LEQUAL);
117
    GLES20.glEnable(GLES20.GL_BLEND);
118
    GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
119
    GLES20.glEnable(GLES20.GL_CULL_FACE);
120
    GLES20.glCullFace(GLES20.GL_BACK);
121
    GLES20.glFrontFace(GLES20.GL_CW);
116
    GLES30.glDepthFunc(GLES30.GL_LEQUAL);
117
    GLES30.glEnable(GLES30.GL_BLEND);
118
    GLES30.glBlendFunc(GLES30.GL_SRC_ALPHA, GLES30.GL_ONE_MINUS_SRC_ALPHA);
119
    GLES30.glEnable(GLES30.GL_CULL_FACE);
120
    GLES30.glCullFace(GLES30.GL_BACK);
121
    GLES30.glFrontFace(GLES30.GL_CW);
122 122

  
123 123
    DistortedEffects.createProgram(resources);
124 124
    EffectQueuePostprocess.createProgram(resources);

Also available in: Unified diff