-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UniformMatrix4f does not seem to work #98
Comments
Numerics structure have special JIT management, and the generic functions on some platforms uses the "obscure" __makeref keyword, which assumes that the value is allocate on stack. On what platform are you running? Maybe in Debug configuration is it working? The Numerics structures is have a column-major order? Maybe it is sufficient to transpose the matrix. The Numerics structure maybe does have the proper StructLayout? |
Linux, mono, net471
Does not work in it.
Wouldn't my |
Correct. Tonight I'll check with some unit tests... |
@luca-piccioni Any update on this? |
I've checked the unit tests for glUniform1-4v, and they are currently calling generic Uniform calls (but not the generic GetUniform calls), and they run successfully on my machine. I thought to be confident that the UniformMatrix generic calls are fine too since the underlying implementation is essentially the same. I suspect that the issue is strictly related to the Numerics structure. If you convert the Numerics.Matrix4 structure to the managed Matrix4x4f structure (or any equivalent), is it working? When I'll have some free time I'll write specific test for UniformMatrix calls. |
It was not working, I checked before submitting this issue. |
Fun note, I found out that the code runs fine on Windows, but not on Linux. |
Unless I am doing something wrong, UniformMatrix4f does not work with System.Numerics.Matrix4x4:
The text was updated successfully, but these errors were encountered: