Skip to content
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

are there any gdb pretty printers for the glm library? #1282

Open
asmwarrior opened this issue Mar 28, 2024 · 0 comments
Open

are there any gdb pretty printers for the glm library? #1282

asmwarrior opened this issue Mar 28, 2024 · 0 comments

Comments

@asmwarrior
Copy link

Hi, when debugging a program with glm library, I would like to see the vectors or matrices in the gdb.

But sometimes, a simple vector shows several duplicated values, see below:

[debug]> output element.pos
[debug]{{x = 0, r = 0, s = 0}, {y = 0.5, g = 0.5, t = 0.5}, {z = 0, b = 0, p = 0}}>>>>>>cb_gdb:

The result visualized window is like the image below under code::blocks IDE:

image

What I think is that I only need tree values: x,y,z for a simple vec3.

[debug]> output axisTransform_scaled
[debug]{value = {{{x = -0.017251512, r = -0.017251512, s = -0.017251512}, {y = -0.017251512, g = -0.017251512, t = -0.017251512}, {z = -0.017251512, b = -0.017251512, p = -0.017251512}, {w = -0.017251512, a = -0.017251512, q = -0.017251512}}, {{x = -0.017251512, r = -0.017251512, s = -0.017251512}, {y = -0.017251512, g = -0.017251512, t = -0.017251512}, {z = -0.017251512, b = -0.017251512, p = -0.017251512}, {w = -0.017251512, a = -0.017251512, q = -0.017251512}}, {{x = -0.017251512, r = -0.017251512, s = -0.017251512}, {y = -0.017251512, g = -0.017251512, t = -0.017251512}, {z = -0.017251512, b = -0.017251512, p = -0.017251512}, {w = -0.017251512, a = -0.017251512, q = -0.017251512}}, {{x = -0.00132703932, r = -0.00132703932, s = -0.00132703932}, {y = -0.00132703932, g = -0.00132703932, t = -0.00132703932}, {z = -0.00132703932, b = -0.00132703932, p = -0.00132703932}, {w = -0.00132703932, a = -0.00132703932, q = -0.00132703932}}}}>>>>>>cb_gdb:

If I try to print a mat4, it becomes more complex with many duplicated values.

Any ideas?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant