Revision 71d8aba1
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/mesh/MeshBase.java | ||
---|---|---|
82 | 82 |
private float mInflate; |
83 | 83 |
private int[] mAssociation; |
84 | 84 |
|
85 |
DeferredJobs.JobNode mJobNode; |
|
85 |
DeferredJobs.JobNode[] mJobNode;
|
|
86 | 86 |
|
87 | 87 |
private static int[] mComponentAssociationH = new int[EffectQueue.MAIN_VARIANTS]; |
88 | 88 |
|
... | ... | |
124 | 124 |
mComponent = new ArrayList<>(); |
125 | 125 |
mAssociation= new int[MAX_COMPONENTS]; |
126 | 126 |
|
127 |
mJobNode = new DeferredJobs.JobNode[1]; |
|
128 |
|
|
127 | 129 |
for(int i=0; i<MAX_COMPONENTS; i++) mAssociation[i] = DEFAULT_ASSOCIATION; |
128 | 130 |
|
129 | 131 |
mVBO1= new InternalBuffer(GLES30.GL_ARRAY_BUFFER , GLES30.GL_STATIC_READ); |
... | ... | |
154 | 156 |
|
155 | 157 |
if( deep ) |
156 | 158 |
{ |
157 |
if( original.mJobNode!=null ) |
|
159 |
mJobNode = new DeferredJobs.JobNode[1]; |
|
160 |
|
|
161 |
if( original.mJobNode[0]!=null ) |
|
158 | 162 |
{ |
159 |
mJobNode = new DeferredJobs.JobNode(original.mJobNode);
|
|
163 |
mJobNode[0] = new DeferredJobs.JobNode(original.mJobNode[0]);
|
|
160 | 164 |
} |
161 | 165 |
|
162 | 166 |
mVBO1= new InternalBuffer(GLES30.GL_ARRAY_BUFFER, GLES30.GL_STATIC_READ); |
... | ... | |
166 | 170 |
} |
167 | 171 |
else |
168 | 172 |
{ |
169 |
mJobNode = original.mJobNode;
|
|
170 |
mVBO1 = original.mVBO1;
|
|
171 |
mVertAttribs1 = original.mVertAttribs1;
|
|
173 |
mJobNode = original.mJobNode; |
|
174 |
mVBO1 = original.mVBO1; |
|
175 |
mVertAttribs1 = original.mVertAttribs1; |
|
172 | 176 |
} |
173 | 177 |
|
174 | 178 |
mVBO2= new InternalBuffer(GLES30.GL_ARRAY_BUFFER, GLES30.GL_STATIC_READ); |
... | ... | |
399 | 403 |
*/ |
400 | 404 |
public void bindVertexAttribs(DistortedProgram program) |
401 | 405 |
{ |
402 |
if( mJobNode!=null ) |
|
406 |
if( mJobNode[0]!=null )
|
|
403 | 407 |
{ |
404 |
mJobNode.execute(); // this will set itself to null |
|
408 |
mJobNode[0].execute(); // this will set itself to null
|
|
405 | 409 |
} |
406 | 410 |
|
407 | 411 |
int index1 = mVBO1.createImmediately(mNumVertices*VERT1_SIZE, mVertAttribs1); |
... | ... | |
508 | 512 |
*/ |
509 | 513 |
public void apply(VertexEffect effect) |
510 | 514 |
{ |
511 |
mJobNode = DeferredJobs.vertex(this,effect); |
|
515 |
mJobNode[0] = DeferredJobs.vertex(this,effect);
|
|
512 | 516 |
} |
513 | 517 |
|
514 | 518 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Bugfix ( Mesh shallow copy wasn't working )