コード例 #1
0
 @Override
 public void setLocations(int programHandle) {
   super.setLocations(programHandle);
   muToonColor0Handle = getUniformLocation(programHandle, ToonShaderVar.U_TOON_COLOR0);
   muToonColor1Handle = getUniformLocation(programHandle, ToonShaderVar.U_TOON_COLOR1);
   muToonColor2Handle = getUniformLocation(programHandle, ToonShaderVar.U_TOON_COLOR2);
   muToonColor3Handle = getUniformLocation(programHandle, ToonShaderVar.U_TOON_COLOR3);
 }
コード例 #2
0
 @Override
 public void applyParams() {
   super.applyParams();
   GLES20.glUniform4fv(muToonColor0Handle, 1, mToonColor0, 0);
   GLES20.glUniform4fv(muToonColor1Handle, 1, mToonColor1, 0);
   GLES20.glUniform4fv(muToonColor2Handle, 1, mToonColor2, 0);
   GLES20.glUniform4fv(muToonColor3Handle, 1, mToonColor3, 0);
 }
コード例 #3
0
  @Override
  public void initialize() {
    super.initialize();
    muToonColor0 = (RVec4) addUniform(ToonShaderVar.U_TOON_COLOR0);
    muToonColor1 = (RVec4) addUniform(ToonShaderVar.U_TOON_COLOR1);
    muToonColor2 = (RVec4) addUniform(ToonShaderVar.U_TOON_COLOR2);
    muToonColor3 = (RVec4) addUniform(ToonShaderVar.U_TOON_COLOR3);

    mgNdotL = new RFloat[mLights.size()];

    for (int i = 0; i < mLights.size(); i++) {
      mgNdotL[i] = (RFloat) addGlobal(DiffuseShaderVar.L_NDOTL, i);
    }
  }