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/olimpic/OlimpicRenderer.java
40 40

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

  
46 46
///////////////////////////////////////////////////////////////////////////////////////////////////
......
119 119
   
120 120
    public void onDrawFrame(GL10 glUnused) 
121 121
      {
122
      GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
122
      GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
123 123
      mScreen.renderTo(mRoot,System.currentTimeMillis());
124 124
      }
125 125

  
......
155 155
    
156 156
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
157 157
      {
158
      GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
158
      GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
159 159

  
160 160
      InputStream is = mView.getContext().getResources().openRawResource(R.raw.leaf);
161 161
      Bitmap leaf;

Also available in: Unified diff