Questions tagged [glm]

GLM is a C++ math library based on the GLSL language.

Filter by
Sorted by
Tagged with
1
vote
1answer
6k views

How should I rotate vertices around the origin on the CPU?

I have tried using glm::rotate and such. glm::translate works fine, but rotate doesn't work (if I rotate before/after a translation). Here is my current setup: ...
6
votes
1answer
12k views

Combining rotation,scaling around a pivot with translation into a matrix

In short: I need to combine rotation (in the form of a quaternion), scaling around a pivot point along with translation into a transformation matrix. The long: I am trying to implement a proprietary ...
6
votes
1answer
14k views

How to implement a basic arcball camera in OpenGL with GLM

I only just started learning OpenGL and even things like vector maths etc a couple of days ago, so I am having a bit of trouble figuring out exactly what to do to ...
4
votes
2answers
30k views

Camera rotation - First Person Camera using GLM

I've just switched from deprecated opengl functions to using shaders and GLM math library and i'm having a few problems setting up my camera rotations (first person camera). I'll show what i've got ...
1
vote
1answer
220 views

Storing transformations in game objects. (GLM, C++)

I'm currently writing a game engine from scratch for learning purposes. I just started implementing transformations. I know how they work in general but I'm not sure how to implement them efficiently ...
1
vote
1answer
853 views

How to recalculate AABB after rotation?

I'm facing a problem trying to calculate the AABB on my models after rotation is applied. The rotation is not applied on the vertex positions directly, but in a seperate rotation matrix - just ...
-2
votes
1answer
647 views

Incorrect rotations using openGL GLM and shaders [closed]

The goal of my program is to display a simple colored triangle rotating on the Y axis without any translation. I'm using the GLM library. The problem is that the transformations of my triangle are not ...