I created a Matrix4f which is a orthogonal perspective for my shader. To store upload the matrix for the shader, it needs to be stored in a FloatBuffer. When I want to put the matrix into the FloatBuffer, I get a error from JOML, my maths library. (I use LWJGL3) Here are the errors:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.joml.MemUtil$MemUtilUnsafe
(file:/C:/Dev/Java/Learn%20OpenGL/lib/joml-1.9.6.jar) to field
java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of
org.joml.MemUtil$MemUtilUnsafe
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
That's my code:
matrix4f = new Matrix4f().ortho(-2.0f, 2.0f, -1.5f, 1.5f, 1.0f, 1.0f);
FloatBuffer matrixBuffer = BufferUtils.createFloatBuffer(16);
matrix4f.get(matrixBuffer);
GL20.glUniformMatrix4fv(Shader.getLocation(shader, "transformationMatrix"), false, matrixBuffer);