ShaderCode tsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(),
"shaders", "shaders/bin", "transparents", true);
tsVp.defaultShaderCustomization(gl, true, true);
tsFp.defaultShaderCustomization(gl, true, true);
transparentsShader = new ShaderProgram();
transparentsShader.add(tsVp);
transparentsShader.add(tsFp);
if(!transparentsShader.link(gl, System.err)) {
throw new GLException("could not link program: " + transparentsShader);
}
gl.glBindAttribLocation(transparentsShader.program(), 0, "aVertexPosition");
gl.glBindAttribLocation(transparentsShader.program(), 1, "aTextureCoord");
tsUPMatrix = gl.glGetUniformLocation(transparentsShader.program(), "uPMatrix");
tsUMVMatrix = gl.glGetUniformLocation(transparentsShader.program(), "uMVMatrix");
tsTex = gl.glGetUniformLocation(transparentsShader.program(), "uSampler");
ShaderCode ssVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, this.getClass(),
"shaders", "shaders/bin", "solids", true);
ShaderCode ssFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, this.getClass(),
"shaders", "shaders/bin", "solids", true);
ssVp.defaultShaderCustomization(gl, true, true);
ssFp.defaultShaderCustomization(gl, true, true);
solidsShader = new ShaderProgram();
solidsShader.add(ssVp);
solidsShader.add(ssFp);
if(!solidsShader.link(gl, System.err)) {
throw new GLException("could not link program: " + solidsShader);
}