private void setTransformation(Matrix4f transformation) { // Compute the modelview matrix by multiplying the camera matrix and // the transformation matrix of the object Matrix4f modelview = new Matrix4f(sceneManager.getCamera().getCameraMatrix()); modelview.mul(transformation); // Set modelview and projection matrices in shader gl.glUniformMatrix4fv( gl.glGetUniformLocation(activeShaderID, "modelview"), 1, false, transformationToFloat16(modelview), 0); gl.glUniformMatrix4fv( gl.glGetUniformLocation(activeShaderID, "projection"), 1, false, transformationToFloat16(sceneManager.getFrustum().getProjectionMatrix()), 0); }