Revision 73bcf555
Added by Leszek Koltunski almost 3 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 |
} |
src/main/java/org/distorted/library/uniformblock/UniformBlockAssociation.java | ||
---|---|---|
56 | 56 |
mAssociations[mStride*i+LOC_EQU] = i; |
57 | 57 |
} |
58 | 58 |
|
59 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_READ);
|
|
59 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
60 | 60 |
} |
61 | 61 |
|
62 | 62 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
69 | 69 |
mAssociations= new int[size]; |
70 | 70 |
System.arraycopy(original.mAssociations, 0, mAssociations, 0, size); |
71 | 71 |
|
72 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_READ);
|
|
72 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
73 | 73 |
} |
74 | 74 |
|
75 | 75 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/library/uniformblock/UniformBlockCenter.java | ||
---|---|---|
42 | 42 |
{ |
43 | 43 |
mMax = MeshBase.getMaxEffComponents(); |
44 | 44 |
mArray= new float[4*mMax]; |
45 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_READ);
|
|
45 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
53 | 53 |
int size = original.mArray.length; |
54 | 54 |
mArray= new float[size]; |
55 | 55 |
System.arraycopy(original.mArray, 0, mArray, 0, size); |
56 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_READ);
|
|
56 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
57 | 57 |
} |
58 | 58 |
|
59 | 59 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/library/uniformblock/UniformBlockFloatUniforms.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
if( mReallyUseUBO ) |
50 | 50 |
{ |
51 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_READ);
|
|
51 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
52 | 52 |
} |
53 | 53 |
} |
54 | 54 |
|
... | ... | |
65 | 65 |
|
66 | 66 |
if( mReallyUseUBO ) |
67 | 67 |
{ |
68 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_READ);
|
|
68 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
69 | 69 |
} |
70 | 70 |
} |
71 | 71 |
|
src/main/java/org/distorted/library/uniformblock/UniformBlockIntUniforms.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
if( mReallyUseUBO ) |
50 | 50 |
{ |
51 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_READ);
|
|
51 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
52 | 52 |
} |
53 | 53 |
} |
54 | 54 |
|
... | ... | |
65 | 65 |
|
66 | 66 |
if( mReallyUseUBO ) |
67 | 67 |
{ |
68 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_READ);
|
|
68 |
mUBO = new InternalBuffer(GLES30.GL_UNIFORM_BUFFER, GLES30.GL_STATIC_DRAW);
|
|
69 | 69 |
} |
70 | 70 |
} |
71 | 71 |
|
Also available in: Unified diff
Correct the glBufferData's usage argument: in UBO and VBO cases, it should be GL_STATIC_DRAW.