Re: Need help understanding use of TextRenderer
Posted by
gouessej on
Feb 14, 2021; 2:47pm
URL: https://forum.jogamp.org/Need-help-understanding-use-of-TextRenderer-tp4041009p4041018.html
Ryan McFall wrote
<pre>
private static Matrix4d getModelViewMatrix (GL gl) {
float[] modelViewMatrix = new float[16];
gl.glGetFloatv(GLMatrixFunc.GL_MODELVIEW_MATRIX, modelViewMatrix, 0);
Matrix4d mvMatrix = new Matrix4d();
mvMatrix.set(modelViewMatrix);
return mvMatrix;
}
</pre>
I advise you to create a single direct NIO buffer once instead of using an array here, JOGL has to perform the conversion for you under the hood.