Revision 1aedf874
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/EffectQueueVertex.java | ||
---|---|---|
45 | 45 |
private static final int NUM_UNIFORMS = 12; |
46 | 46 |
private static final int NUM_CACHE = 3; |
47 | 47 |
private static final int INDEX = EffectTypes.VERTEX.ordinal(); |
48 |
private static int[] mNumEffectsH = new int[DistortedEffects.NUM_PROGRAMS];
|
|
49 |
private static int[] mTypeH = new int[DistortedEffects.NUM_PROGRAMS];
|
|
50 |
private static int[] mUniformsH = new int[DistortedEffects.NUM_PROGRAMS];
|
|
48 |
private static int mNumEffectsH;
|
|
49 |
private static int mTypeH;
|
|
50 |
private static int mUniformsH;
|
|
51 | 51 |
|
52 | 52 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
53 | 53 |
|
... | ... | |
58 | 58 |
|
59 | 59 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
60 | 60 |
|
61 |
static void getUniforms(int index, int mProgramH)
|
|
61 |
static void getUniforms(int mProgramH) |
|
62 | 62 |
{ |
63 |
mNumEffectsH[index]= GLES30.glGetUniformLocation( mProgramH, "vNumEffects");
|
|
64 |
mTypeH[index] = GLES30.glGetUniformLocation( mProgramH, "vType");
|
|
65 |
mUniformsH[index] = GLES30.glGetUniformLocation( mProgramH, "vUniforms");
|
|
63 |
mNumEffectsH= GLES30.glGetUniformLocation( mProgramH, "vNumEffects"); |
|
64 |
mTypeH = GLES30.glGetUniformLocation( mProgramH, "vType"); |
|
65 |
mUniformsH = GLES30.glGetUniformLocation( mProgramH, "vUniforms"); |
|
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
133 | 133 |
|
134 | 134 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
135 | 135 |
|
136 |
synchronized void send(int index, float halfX, float halfY, float halfZ)
|
|
136 |
synchronized void send(float halfX, float halfY, float halfZ) |
|
137 | 137 |
{ |
138 |
GLES30.glUniform1i( mNumEffectsH[index], mNumEffects);
|
|
138 |
GLES30.glUniform1i( mNumEffectsH, mNumEffects); |
|
139 | 139 |
|
140 | 140 |
if( mNumEffects>0 ) |
141 | 141 |
{ |
... | ... | |
146 | 146 |
mUniforms[NUM_UNIFORMS*i+7] = mCache[NUM_CACHE*i+2]-halfZ; |
147 | 147 |
} |
148 | 148 |
|
149 |
GLES30.glUniform1iv( mTypeH[index] , mNumEffects, mName ,0);
|
|
150 |
GLES30.glUniform4fv( mUniformsH[index],(NUM_UNIFORMS/4)*mNumEffects, mUniforms,0);
|
|
149 |
GLES30.glUniform1iv( mTypeH , mNumEffects, mName ,0); |
|
150 |
GLES30.glUniform4fv( mUniformsH,(NUM_UNIFORMS/4)*mNumEffects, mUniforms,0); |
|
151 | 151 |
} |
152 | 152 |
} |
153 | 153 |
|
154 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
155 |
|
|
156 |
synchronized void sendZero(int index) |
|
157 |
{ |
|
158 |
GLES30.glUniform1i( mNumEffectsH[index], 0); |
|
159 |
} |
|
160 |
|
|
161 | 154 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
162 | 155 |
// Do various post-processing on already computed effects. |
163 | 156 |
// 1) here unlike in the fragment queue, we don't have to multiply the points by ModelView matrix because that gets done in the shader. |
Also available in: Unified diff
Revert "Beginnings of support for DistortedEffects.drawPrivFeedback()"
This reverts commit a22c66287b616833b0ad72d81d40cc321e4bc920.