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/girl/GirlRenderer.java
41 41

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

  
47 47
///////////////////////////////////////////////////////////////////////////////////////////////////
......
153 153
   
154 154
   public void onDrawFrame(GL10 glUnused) 
155 155
      {
156
      GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
156
      GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
157 157
      mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() );
158 158
      }
159 159

  
......
187 187
    
188 188
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
189 189
      {
190
      GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
190
      GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
191 191

  
192 192
      InputStream is = mView.getContext().getResources().openRawResource(R.raw.girl);
193 193
      Bitmap bitmap;

Also available in: Unified diff