Closed Ravbug closed 4 years ago
Hi - the code you've shown is correct and should work. I suspect there might be an issue with your transforms, possibly there is an error in the conversion between your application matrix type and Im3d::Mat4
. Note that by default Im3d uses a column major internal matrix layout unless you define IM3D_MATRIX_ROW_MAJOR 1
(see im3d_config.h
).
Transposing to column-major fixed it, thank you!
I'm confused about how to draw primitives in different locations. If I run the following code:
The resulting primitive's vertices in the draw callback are always exactly the same, regardless of the matrix I pass in. What is the correct way to transform a primitive so that its vertices are transformed? I can of course pass a different matrix directly into the shader, but this translates all of the shapes I draw, and not each one individually.