Revision 6e7c8721
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/EffectQueueMatrix.java | ||
---|---|---|
47 | 47 |
private static float[] mViewMatrix= new float[16]; |
48 | 48 |
|
49 | 49 |
private static int mObjDH; // This is a handle to half a Object dimensions |
50 |
private static int mDepthH; // Handle to the max Depth, i.e (farplane-nearplane)/2 |
|
51 | 50 |
private static int mMVPMatrixH; // pass in the transformation matrix |
52 | 51 |
private static int mMVMatrixH; // pass in the modelview matrix. |
53 | 52 |
|
... | ... | |
192 | 191 |
static void getUniforms(int mProgramH) |
193 | 192 |
{ |
194 | 193 |
mObjDH = GLES30.glGetUniformLocation(mProgramH, "u_objD"); |
195 |
mDepthH = GLES30.glGetUniformLocation(mProgramH, "u_Depth"); |
|
196 | 194 |
mMVPMatrixH= GLES30.glGetUniformLocation(mProgramH, "u_MVPMatrix"); |
197 | 195 |
mMVMatrixH = GLES30.glGetUniformLocation(mProgramH, "u_MVMatrix"); |
198 | 196 |
} |
... | ... | |
256 | 254 |
constructMatrices(projection,halfX,halfY); |
257 | 255 |
|
258 | 256 |
GLES30.glUniform3f( mObjDH , halfX, halfY, halfZ); |
259 |
GLES30.glUniform1f( mDepthH, projection.mDepth); |
|
260 | 257 |
GLES30.glUniformMatrix4fv(mMVMatrixH , 1, false, mViewMatrix, 0); |
261 | 258 |
GLES30.glUniformMatrix4fv(mMVPMatrixH, 1, false, mMVPMatrix , 0); |
262 | 259 |
} |
Also available in: Unified diff
Simplifications.