-
Fatal bug in GLM getting started code example
I used the bit of code from the getting started page just to see if it compiled ok, and it actually triggered an assertion. It looks like the code on the getting started page has a bug:
http://glm.g-truc.net/api-0.9.2/a00001.html
The pdf manual has the same example but with the correct index to Model [] operator, 3 instead of 4.
This is the code from the getting started page:
glm::vec4 Position = glm::vec4(glm::vec3(0.0), 1.0);
glm::mat4 Model = glm::mat4(1.0);
Model[4] = glm::vec4(1.0, 1.0, 0.0, 1.0);
glm::vec4 Transformed = Model * Position;
A nice way to confuse newcomers
-
Super Moderator
Frequent Contributor
Re: Fatal bug in GLM getting started code example
Duplicating the manual in the API was maybe not such a great idea...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules