Revision 41a85bb7
Added by Leszek Koltunski almost 6 years ago
src/main/java/org/distorted/examples/bitmaptree/BitmapTreeRenderer.java | ||
---|---|---|
47 | 47 |
|
48 | 48 |
import android.graphics.Bitmap; |
49 | 49 |
import android.graphics.BitmapFactory; |
50 |
import android.opengl.GLES30;
|
|
50 |
import android.opengl.GLES31;
|
|
51 | 51 |
import android.opengl.GLSurfaceView; |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
89 | 89 |
|
90 | 90 |
private void setDepthPriv() |
91 | 91 |
{ |
92 |
if( mDepth ) mRoot.glEnable (GLES30.GL_DEPTH_TEST);
|
|
93 |
else mRoot.glDisable(GLES30.GL_DEPTH_TEST);
|
|
92 |
if( mDepth ) mRoot.glEnable (GLES31.GL_DEPTH_TEST);
|
|
93 |
else mRoot.glDisable(GLES31.GL_DEPTH_TEST);
|
|
94 | 94 |
|
95 | 95 |
mRoot.glDepthMask(mDepth); |
96 | 96 |
|
... | ... | |
145 | 145 |
// TODO |
146 | 146 |
// This appears to be needed in case we create the app anew with NO DEPTH |
147 | 147 |
// (i.e. we set 'no depth' and then rotate screen). Investigate. |
148 |
GLES30.glEnable(GLES30.GL_CULL_FACE);
|
|
149 |
GLES30.glCullFace(GLES30.GL_BACK);
|
|
150 |
GLES30.glFrontFace(GLES30.GL_CW);
|
|
148 |
GLES31.glEnable(GLES31.GL_CULL_FACE);
|
|
149 |
GLES31.glCullFace(GLES31.GL_BACK);
|
|
150 |
GLES31.glFrontFace(GLES31.GL_CW);
|
|
151 | 151 |
|
152 | 152 |
InputStream is1 = mView.getContext().getResources().openRawResource(R.raw.monalisa); |
153 | 153 |
InputStream is2 = mView.getContext().getResources().openRawResource(R.raw.grid); |
Also available in: Unified diff
Convert everythig to GLES31 (there were some GLES30 remnants)