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/starwars/StarWarsRenderer.java
48 48
import android.graphics.Canvas;
49 49
import android.graphics.Paint;
50 50
import android.graphics.Typeface;
51
import android.opengl.GLES20;
51
import android.opengl.GLES30;
52 52
import android.opengl.GLSurfaceView;
53 53

  
54 54
///////////////////////////////////////////////////////////////////////////////////////////////////
......
149 149
   
150 150
  public void onDrawFrame(GL10 glUnused) 
151 151
    {
152
    GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
152
    GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
153 153
    mScreen.renderTo(mRoot,System.currentTimeMillis());
154 154
    }
155 155

  
......
180 180
    
181 181
  public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
182 182
    {
183
    GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
183
    GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
184 184

  
185 185
    setupBitmaps();
186 186

  

Also available in: Unified diff