Revision 43814a57
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/library/main/InternalBuffer.java | ||
---|---|---|
38 | 38 |
*/ |
39 | 39 |
public class InternalBuffer extends InternalObject |
40 | 40 |
{ |
41 |
private static final int DONE = 0; |
|
41 | 42 |
private static final int RECREATE = 1; |
42 | 43 |
private static final int UPDATE = 2; |
43 | 44 |
|
... | ... | |
57 | 58 |
mUsage = usage; |
58 | 59 |
mBuffer = null; |
59 | 60 |
mSize = 0; |
60 |
|
|
61 |
recreate(); |
|
61 |
mStatus = RECREATE; |
|
62 | 62 |
} |
63 | 63 |
|
64 | 64 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
93 | 93 |
updateFloat(buffer); |
94 | 94 |
} |
95 | 95 |
|
96 |
mStatus = 0;
|
|
96 |
mStatus = DONE;
|
|
97 | 97 |
|
98 | 98 |
return mIndex[0]; |
99 | 99 |
} |
... | ... | |
130 | 130 |
updateInt(buffer); |
131 | 131 |
} |
132 | 132 |
|
133 |
mStatus = 0;
|
|
133 |
mStatus = DONE;
|
|
134 | 134 |
|
135 | 135 |
return mIndex[0]; |
136 | 136 |
} |
... | ... | |
145 | 145 |
GLES30.glBindBuffer( mTarget, mIndex[0]); |
146 | 146 |
GLES30.glBufferData( mTarget, mSize, mBuffer, mUsage); |
147 | 147 |
GLES30.glBindBuffer( mTarget, 0); |
148 |
|
|
149 |
mStatus &= (~UPDATE); |
|
148 | 150 |
} |
149 | 151 |
|
150 | 152 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
157 | 159 |
GLES30.glBindBuffer( mTarget, mIndex[0]); |
158 | 160 |
GLES30.glBufferData( mTarget, mSize, mBuffer, mUsage); |
159 | 161 |
GLES30.glBindBuffer( mTarget, 0); |
162 |
|
|
163 |
mStatus &= (~UPDATE); |
|
160 | 164 |
} |
161 | 165 |
|
162 | 166 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
175 | 179 |
GLES30.glBindBuffer( mTarget, mIndex[0]); |
176 | 180 |
GLES30.glBufferData( mTarget, mSize, mBuffer, mUsage); |
177 | 181 |
GLES30.glBindBuffer( mTarget, 0); |
182 |
|
|
183 |
mStatus = DONE; |
|
178 | 184 |
} |
179 | 185 |
|
180 | 186 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Fix the fact that the static DistortedEffects.mAllQueues was global, shared between all Activities.
Completely replace this mechanism with a non-static list of links from a VertexEffect to all VertexEffectQueues this effect is a member of.