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/sink/SinkRenderer.java
39 39

  
40 40
import android.graphics.Bitmap;
41 41
import android.graphics.BitmapFactory;
42
import android.opengl.GLES20;
42
import android.opengl.GLES30;
43 43
import android.opengl.GLSurfaceView;
44 44

  
45 45
///////////////////////////////////////////////////////////////////////////////////////////////////
......
73 73
   
74 74
  public void onDrawFrame(GL10 glUnused) 
75 75
    {
76
    GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
76
    GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
77 77
    mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() );
78 78
    }
79 79

  
......
107 107
    
108 108
  public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
109 109
    {
110
    GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
110
    GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
111 111

  
112 112
    InputStream is = mView.getContext().getResources().openRawResource(R.raw.cat);
113 113
    Bitmap bitmap;

Also available in: Unified diff