public void updateModelMatrix(GL2GL3 gl, Shader shader, PMVMatrix model) { model.update(); // if(gl.glGetUniformLocation(shader.getID(), "model") == -1) // System.out.println("uniform model error"); gl.glUniformMatrix4fv( gl.glGetUniformLocation(shader.getID(), "model"), 1, false, model.glGetMatrixf(GL2.GL_MODELVIEW)); }
public void updatePVMatrixtess(GL2GL3 gl) { shadertess.use(gl); gl.glUniformMatrix4fv(uniformviewtess, 1, false, pvmat.glGetMatrixf(GL2.GL_MODELVIEW)); gl.glUniformMatrix4fv(uniformprojtess, 1, false, pvmat.glGetMatrixf(GL2.GL_PROJECTION)); Shader.unuse(gl); }