Revision 41a81a14
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/projection/ProjectionRenderer.java | ||
---|---|---|
34 | 34 |
import android.graphics.Canvas; |
35 | 35 |
import android.graphics.Paint; |
36 | 36 |
import android.graphics.Paint.Style; |
37 |
import android.opengl.GLES20;
|
|
37 |
import android.opengl.GLES30;
|
|
38 | 38 |
import android.opengl.GLSurfaceView; |
39 | 39 |
|
40 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
90 | 90 |
|
91 | 91 |
public void onDrawFrame(GL10 glUnused) |
92 | 92 |
{ |
93 |
GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
|
|
93 |
GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
|
|
94 | 94 |
mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() ); |
95 | 95 |
} |
96 | 96 |
|
... | ... | |
142 | 142 |
|
143 | 143 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
144 | 144 |
{ |
145 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
|
145 |
GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
|
146 | 146 |
|
147 | 147 |
try |
148 | 148 |
{ |
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!)