Revision 26671ef8
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/mesh/MeshBase.java | ||
---|---|---|
306 | 306 |
} |
307 | 307 |
} |
308 | 308 |
|
309 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
310 |
|
|
311 |
void setEffectAssociationNow(int component, int andAssociation, int equAssociation) |
|
312 |
{ |
|
313 |
mAndAssociation[component] = andAssociation; |
|
314 |
mEquAssociation[component] = equAssociation; |
|
315 |
} |
|
316 |
|
|
309 | 317 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
310 | 318 |
|
311 | 319 |
int numTexComponents() |
... | ... | |
344 | 352 |
TexComponent comp; |
345 | 353 |
int numMeshes = meshes.length; |
346 | 354 |
int numVertices,origVertices = mNumVertices; |
347 |
int origTexComponents=0,numTexComponents;
|
|
355 |
int origTexComponents,numTexComponents; |
|
348 | 356 |
int origEffComponents=0,numEffComponents; |
349 | 357 |
|
350 | 358 |
if( origVertices>0 ) |
... | ... | |
591 | 599 |
*/ |
592 | 600 |
public void print() |
593 | 601 |
{ |
594 |
StringBuffer sb = new StringBuffer();
|
|
602 |
StringBuilder sb = new StringBuilder();
|
|
595 | 603 |
|
596 | 604 |
for(int i=0; i<mNumVertices; i++) |
597 | 605 |
{ |
... | ... | |
604 | 612 |
sb.append(") "); |
605 | 613 |
} |
606 | 614 |
|
607 |
StringBuffer sb2 = new StringBuffer();
|
|
615 |
StringBuilder sb2 = new StringBuilder();
|
|
608 | 616 |
|
609 | 617 |
for(int i=0; i<mNumVertices; i++) |
610 | 618 |
{ |
... | ... | |
884 | 892 |
* The point: this way we can configure the system so that each Vertex Effect acts only on a certain |
885 | 893 |
* subset of a Mesh, thus potentially significantly reducing the number of render calls. |
886 | 894 |
*/ |
887 |
public void setEffectAssociation(int component, int andAssociation, int equAssociation) |
|
888 |
{ |
|
889 |
if( component>=0 && component<MAX_EFFECT_COMPONENTS ) |
|
890 |
{ |
|
891 |
mAndAssociation[component] = andAssociation; |
|
892 |
mEquAssociation[component] = equAssociation; |
|
893 |
} |
|
894 |
} |
|
895 |
public void setEffectAssociation(int component, int andAssociation, int equAssociation) |
|
896 |
{ |
|
897 |
if( component>=0 && component<MAX_EFFECT_COMPONENTS ) |
|
898 |
{ |
|
899 |
if( mJobNode[0]==null ) |
|
900 |
{ |
|
901 |
setEffectAssociationNow(component, andAssociation, equAssociation); |
|
902 |
} |
|
903 |
else |
|
904 |
{ |
|
905 |
mJobNode[0] = DeferredJobs.effectAssoc(this,component,andAssociation,equAssociation); |
|
906 |
} |
|
907 |
} |
|
908 |
} |
|
895 | 909 |
|
896 | 910 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
897 | 911 |
/** |
Also available in: Unified diff
Library: make setEffectAssociation a deferred job (because we do copy the uniforms during join!)
SingleMesh App: almost finished.