Revision 420836fc
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/MeshObject.java | ||
---|---|---|
82 | 82 |
GLES30.glBufferData(GLES30.GL_ARRAY_BUFFER, numVertices*VERTSIZE, mVertAttribs, GLES30.GL_STATIC_READ); |
83 | 83 |
GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, 0); |
84 | 84 |
} |
85 |
if( mAttTFO[0]<0 ) |
|
85 |
if( mAttTFO[0]<0 && Distorted.GLSL >= 300 )
|
|
86 | 86 |
{ |
87 | 87 |
GLES30.glGenBuffers(1, mAttTFO, 0); |
88 | 88 |
GLES30.glBindBuffer(GLES30.GL_TRANSFORM_FEEDBACK_BUFFER, mAttTFO[0]); |
... | ... | |
138 | 138 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
139 | 139 |
/** |
140 | 140 |
* When rendering this Mesh, do we want to render the Normal vectors as well? |
141 |
* <p> |
|
142 |
* Will work only on OpenGL ES >= 3.0 devices. |
|
141 | 143 |
* |
142 | 144 |
* @param show Controls if we render the Normal vectors or not. |
143 | 145 |
*/ |
144 | 146 |
public void setShowNormals(boolean show) |
145 | 147 |
{ |
146 |
mShowNormals = show;
|
|
148 |
mShowNormals = (Distorted.GLSL >= 300 && show);
|
|
147 | 149 |
} |
148 | 150 |
} |
149 | 151 |
|
Also available in: Unified diff
Some corrections so that most apps still work on the Android emulator (OpenGL ES 2.0-based)