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/fbo/FBORenderer.java
42 42

  
43 43
import android.graphics.Bitmap;
44 44
import android.graphics.BitmapFactory;
45
import android.opengl.GLES20;
45
import android.opengl.GLES30;
46 46
import android.opengl.GLSurfaceView;
47 47

  
48 48
///////////////////////////////////////////////////////////////////////////////////////////////////
......
79 79
   
80 80
   public void onDrawFrame(GL10 glUnused)
81 81
      {
82
      GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
82
      GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
83 83
      mScreen.renderTo(mRoot,System.currentTimeMillis());
84 84
      }
85 85

  
......
113 113
    
114 114
   public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
115 115
      {
116
      GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
116
      GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
117 117

  
118 118
      InputStream is1 = mView.getContext().getResources().openRawResource(R.raw.monalisa);
119 119
      InputStream is2 = mView.getContext().getResources().openRawResource(R.raw.grid);

Also available in: Unified diff