Revision 36d65d88
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/effectqueue/EffectQueueVertex.java | ||
---|---|---|
40 | 40 |
private static int[] mNameH = new int[MAIN_VARIANTS]; |
41 | 41 |
private static int[] mUniformsH = new int[MAIN_VARIANTS]; |
42 | 42 |
private static int[] mAssociationH= new int[MAIN_VARIANTS]; |
43 |
private static int[] mComponentH = new int[MAIN_VARIANTS]; |
|
43 | 44 |
private static int[] mInflateH = new int[MAIN_VARIANTS]; |
44 | 45 |
|
45 | 46 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
63 | 64 |
mNumEffectsH[variant] = GLES30.glGetUniformLocation( mProgramH, "vNumEffects"); |
64 | 65 |
mNameH[variant] = GLES30.glGetUniformLocation( mProgramH, "vName"); |
65 | 66 |
mUniformsH[variant] = GLES30.glGetUniformLocation( mProgramH, "vUniforms"); |
66 |
mAssociationH[variant]= GLES30.glGetUniformLocation( mProgramH, "vAssociation"); |
|
67 |
mAssociationH[variant]= GLES30.glGetUniformLocation( mProgramH, "vEffectAssoc"); |
|
68 |
mComponentH[variant] = GLES30.glGetUniformLocation( mProgramH, "vEffectCompo"); |
|
67 | 69 |
mInflateH[variant] = GLES30.glGetUniformLocation( mProgramH, "u_Inflate"); |
68 | 70 |
} |
69 | 71 |
|
... | ... | |
83 | 85 |
{ |
84 | 86 |
mCurrentDuration[i] += step; |
85 | 87 |
mAssociation[i] = mEffects[i].getAssociation(); |
88 |
mComponent[i] = mEffects[i].getComponent(); |
|
86 | 89 |
|
87 | 90 |
if( mEffects[i].compute(mUniforms, NUM_UNIFORMS*i, mCurrentDuration[i], step) ) |
88 | 91 |
{ |
... | ... | |
108 | 111 |
{ |
109 | 112 |
GLES30.glUniform1iv( mNameH[variant] , mNumEffects, mName , 0); |
110 | 113 |
GLES30.glUniform1iv( mAssociationH[variant], mNumEffects, mAssociation, 0); |
114 |
GLES30.glUniform1iv( mComponentH[variant] , mNumEffects, mComponent , 0); |
|
111 | 115 |
GLES30.glUniform4fv( mUniformsH[variant] ,(NUM_UNIFORMS/4)*mNumEffects, mUniforms , 0); |
112 | 116 |
} |
113 | 117 |
} |
Also available in: Unified diff
Progress making it possible to apply Vertex Effects only to some Components of a Mesh.