Revision bc208a9c
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/effectqueue/EffectQueueVertex.java | ||
---|---|---|
39 | 39 |
private static int[] mNumEffectsH = new int[MAIN_VARIANTS]; |
40 | 40 |
private static int[] mNameH = new int[MAIN_VARIANTS]; |
41 | 41 |
private static int[] mUniformsH = new int[MAIN_VARIANTS]; |
42 |
private static int[] mTagH = new int[MAIN_VARIANTS]; |
|
42 | 43 |
private static int[] mInflateH = new int[MAIN_VARIANTS]; |
43 | 44 |
|
44 | 45 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
62 | 63 |
mNumEffectsH[variant]= GLES30.glGetUniformLocation( mProgramH, "vNumEffects"); |
63 | 64 |
mNameH[variant] = GLES30.glGetUniformLocation( mProgramH, "vName"); |
64 | 65 |
mUniformsH[variant] = GLES30.glGetUniformLocation( mProgramH, "vUniforms"); |
66 |
mTagH[variant] = GLES30.glGetUniformLocation( mProgramH, "vTag"); |
|
65 | 67 |
mInflateH[variant] = GLES30.glGetUniformLocation( mProgramH, "u_Inflate"); |
66 | 68 |
} |
67 | 69 |
|
... | ... | |
80 | 82 |
for(int i=0; i<mNumEffects; i++) |
81 | 83 |
{ |
82 | 84 |
mCurrentDuration[i] += step; |
85 |
mTag[i] = mEffects[i].getTag(); |
|
83 | 86 |
|
84 | 87 |
if( mEffects[i].compute(mUniforms, NUM_UNIFORMS*i, mCurrentDuration[i], step) ) |
85 | 88 |
{ |
... | ... | |
104 | 107 |
if( mNumEffects>0 ) |
105 | 108 |
{ |
106 | 109 |
GLES30.glUniform1iv( mNameH[variant] , mNumEffects, mName ,0); |
110 |
GLES30.glUniform1iv( mTagH[variant] , mNumEffects, mTag ,0); |
|
107 | 111 |
GLES30.glUniform4fv( mUniformsH[variant],(NUM_UNIFORMS/4)*mNumEffects, mUniforms,0); |
108 | 112 |
} |
109 | 113 |
} |
Also available in: Unified diff
Introduce 'tags' (soon to be renamed to 'associations') to Mesh and VertexEffect.
A 'tag' is a way to associate a Vertex Effect only to a subgroup of a given Mesh's vertices (more precisely, only to an arbitrary subset of its Components)