Revision 41a81a14
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/matrix3d/Matrix3DRenderer.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.examples.matrix3d; |
21 | 21 |
|
22 |
import android.opengl.GLES20;
|
|
22 |
import android.opengl.GLES30;
|
|
23 | 23 |
import android.opengl.GLSurfaceView; |
24 | 24 |
|
25 | 25 |
import org.distorted.library.Distorted; |
... | ... | |
61 | 61 |
|
62 | 62 |
public void onDrawFrame(GL10 glUnused) |
63 | 63 |
{ |
64 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
|
|
64 |
GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
|
|
65 | 65 |
mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() ); |
66 | 66 |
} |
67 | 67 |
|
... | ... | |
93 | 93 |
|
94 | 94 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
95 | 95 |
{ |
96 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
|
96 |
GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
|
97 | 97 |
|
98 | 98 |
Matrix3DActivity act = (Matrix3DActivity)mView.getContext(); |
99 | 99 |
|
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!)