When I use NIM GLM to create a projection matrix and attempt to pass that to a shader with glUniformMatrix4fv, I get a type mismatch issue. The matrix pointer is of type ptr float64 and I assume that glUniformMatrix4fv needs ptr float32.
I'll be damned if I can figure out how to convert this or ensure the projection matrix starts off at the right level of precision.
Interestingly all other matrcies I have created - such as model and view - pass to the shaders without a hitch.
Here is the code...
var
projection = perspective(PI/2, aspectRatio, 0.1f, 100.0f)
projectionMatrixLocation: int32
#... later in the main loop
projectionMatrixLocation = glGetUniformLocation(shaderProgram,"projection")
#...
while not window.windowShouldClose:
#...
glUniformMatrix4fv(projectionMatrixLocation, 1, false, projection.caddr) #here the error comes
#...
# in the shader
uniform mat4 projection;