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/differentbitmaps/DifferentBitmapsRenderer.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
///////////////////////////////////////////////////////////////////////////////////////////////////
......
107 107
   
108 108
    public void onDrawFrame(GL10 glUnused) 
109 109
      {
110
      GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
110
      GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
111 111
      
112 112
      long time = System.currentTimeMillis();
113 113
      
......
154 154
    
155 155
    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
156 156
      {
157
      GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
157
      GLES30.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
158 158

  
159 159
      Bitmap bitmap0= readBitmap(R.raw.dog);
160 160
      Bitmap bitmap1= readBitmap(R.raw.face);

Also available in: Unified diff