question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UniformMatrix4f does not seem to work

See original GitHub issue

Unless I am doing something wrong, UniformMatrix4f does not work with System.Numerics.Matrix4x4:

// works 
fixed (Matrix4x4* native = &_mvp)
    Gl.UniformMatrix4(_matrixid, 1, false, (float*)native);

// does not work :(
// Gl.UniformMatrix4f<Matrix4x4>(_matrixid, 1, false, ref _mvp);

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
harry-cppcommented, Dec 1, 2019

Fun note, I found out that the code runs fine on Windows, but not on Linux.

0reactions
harry-cppcommented, May 15, 2018

If you convert the Numerics.Matrix4 structure to the managed Matrix4x4f structure (or any equivalent), is it working?

It was not working, I checked before submitting this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED]Issues with loading a Matrix4f as a uniform ...
Hello, I need help. I have a rather complicated problem with loading uniform variables to my vertex shader.
Read more >
Can't give Matrix to Shader as uniform
I'm currently implementing matrices in my enigne. With standard glTranslate and glRotate and then ftransform() in the shader it works. Done ...
Read more >
glUniformBlockBinding doesn't work
Creating and drawing vertex buffer correctly. If use gl_Position = vec4(POSITION, 1.0f);. drawing works, but using matrices draw doesn't work ...
Read more >
Matrix4f (JOML 1.10.5 API)
Compute the extents of the coordinate system before this affine transformation was applied and store the resulting corner coordinates in corner and the...
Read more >
[SOLVED]Convert glsl 4.0 to 1.2 for equirectEnvMap
Hi, Now I'm converting version 400 to 120 to put Equirect enviroment map technique into my Work. i think i'll have to do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found