Revision 96e3b88a
Added by Leszek Koltunski over 5 years ago
| src/main/java/org/distorted/library/mesh/AssociationUniformBlock.java | ||
|---|---|---|
| 79 | 79 |
*/ |
| 80 | 80 |
public static void setAssociationSize(int size) |
| 81 | 81 |
{
|
| 82 |
mAssociationSize = size; |
|
| 82 |
if( size>0 ) mAssociationSize = size; // if we are not using any VertexEffects, there |
|
| 83 |
// will be no 'meshAssociation' UBO in the shader, |
|
| 84 |
// and thus its detected size will be 0. Do not change |
|
| 85 |
// the initial guess then - we still might need the |
|
| 86 |
// associations for applying the MatrixEffects to a |
|
| 87 |
// mesh, for one. |
|
| 83 | 88 |
} |
| 84 | 89 |
|
| 85 | 90 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| ... | ... | |
| 136 | 141 |
|
| 137 | 142 |
if( mAssociationSize != 4*oldLen ) |
| 138 | 143 |
{
|
| 144 |
android.util.Log.e("ass", "assSize="+mAssociationSize+" oldLen="+oldLen);
|
|
| 145 |
|
|
| 139 | 146 |
int[] tmp = new int[oldLen]; |
| 140 | 147 |
System.arraycopy(mAssociations, 0, tmp, 0, oldLen); |
| 141 | 148 |
|
Also available in: Unified diff
Introducing UBO to Effect Queues: step 1.