Revision 73bcf555
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/library/mesh/MeshBase.java | ||
---|---|---|
144 | 144 |
|
145 | 145 |
if( mUseCenters ) mUBC = new UniformBlockCenter(); |
146 | 146 |
|
147 |
mVBO1= new InternalBuffer(GLES30.GL_ARRAY_BUFFER , GLES30.GL_STATIC_READ);
|
|
148 |
mVBO2= new InternalBuffer(GLES30.GL_ARRAY_BUFFER , GLES30.GL_STATIC_READ);
|
|
147 |
mVBO1= new InternalBuffer(GLES30.GL_ARRAY_BUFFER , GLES30.GL_STATIC_DRAW);
|
|
148 |
mVBO2= new InternalBuffer(GLES30.GL_ARRAY_BUFFER , GLES30.GL_STATIC_DRAW);
|
|
149 | 149 |
mTFO = new InternalBuffer(GLES30.GL_TRANSFORM_FEEDBACK_BUFFER, GLES30.GL_STATIC_READ); |
150 | 150 |
} |
151 | 151 |
|
... | ... | |
185 | 185 |
{ |
186 | 186 |
shallowCopy(original); |
187 | 187 |
|
188 |
mVBO1= new InternalBuffer(GLES30.GL_ARRAY_BUFFER, GLES30.GL_STATIC_READ);
|
|
188 |
mVBO1= new InternalBuffer(GLES30.GL_ARRAY_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
189 | 189 |
mVertAttribs1= new float[mNumVertices*VERT1_ATTRIBS]; |
190 | 190 |
System.arraycopy(original.mVertAttribs1,0,mVertAttribs1,0,mNumVertices*VERT1_ATTRIBS); |
191 | 191 |
} |
... | ... | |
206 | 206 |
mEffComponent = new ArrayList<>(); |
207 | 207 |
mEffComponent.addAll(original.mEffComponent); |
208 | 208 |
|
209 |
mVBO2= new InternalBuffer(GLES30.GL_ARRAY_BUFFER, GLES30.GL_STATIC_READ);
|
|
209 |
mVBO2= new InternalBuffer(GLES30.GL_ARRAY_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
210 | 210 |
mVertAttribs2= new float[mNumVertices*VERT2_ATTRIBS]; |
211 | 211 |
System.arraycopy(original.mVertAttribs2,0,mVertAttribs2,0,mNumVertices*VERT2_ATTRIBS); |
212 | 212 |
} |
Also available in: Unified diff
Correct the glBufferData's usage argument: in UBO and VBO cases, it should be GL_STATIC_DRAW.