Project

General

Profile

« Previous | Next » 

Revision 41a81a14

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/examples/effects3d/Effects3DRenderer.java
21 21

  
22 22
import android.graphics.Bitmap;
23 23
import android.graphics.BitmapFactory;
24
import android.opengl.GLES20;
24
import android.opengl.GLES30;
25 25
import android.opengl.GLSurfaceView;
26 26

  
27 27
import org.distorted.examples.R;
......
133 133

  
134 134
    public void onDrawFrame(GL10 glUnused)
135 135
      {
136
      GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
136
      GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
137 137

  
138 138
      long time = System.currentTimeMillis();
139 139

  
......
221 221

  
222 222
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
223 223
      {
224
      GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
224
      GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
225 225

  
226 226
      Effects3DActivity act = (Effects3DActivity)mView.getContext();
227 227

  

Also available in: Unified diff