Revision 41a81a14
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java | ||
---|---|---|
21 | 21 |
|
22 | 22 |
import android.graphics.Bitmap; |
23 | 23 |
import android.graphics.BitmapFactory; |
24 |
import android.opengl.GLES20;
|
|
24 |
import android.opengl.GLES30;
|
|
25 | 25 |
import android.opengl.GLSurfaceView; |
26 | 26 |
|
27 | 27 |
import org.distorted.examples.R; |
... | ... | |
76 | 76 |
|
77 | 77 |
public void onDrawFrame(GL10 glUnused) |
78 | 78 |
{ |
79 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
|
|
79 |
GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
|
|
80 | 80 |
mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() ); |
81 | 81 |
} |
82 | 82 |
|
... | ... | |
108 | 108 |
|
109 | 109 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
110 | 110 |
{ |
111 |
GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
|
|
111 |
GLES30.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
|
|
112 | 112 |
|
113 | 113 |
InputStream is = mView.getContext().getResources().openRawResource(R.raw.face); |
114 | 114 |
Bitmap bitmap; |
Also available in: Unified diff
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!)