Does OpenGL use active or passive transformations. I saw a video that said
GLM::lookat
used passive transformation were the camera moves the world, not the objects in themselves.
Does OpenGL use active or passive transformations. I saw a video that said
GLM::lookat
used passive transformation were the camera moves the world, not the objects in themselves.
Moving single camera is way cheaper than moving every single object individually.
So what's the point in making camera to behave differently?
OpenGL does not "move" anything, because it would mean that the camera model or the object model would be altered. There is just a temporary copy of a subset of the vertices on the GPU that are altered. Moreover, GLM is related to but not part of OpenGL.
Mathematically changing the view means to put another transformation V' between the view matrix V so far and the world placement of the object's vertex position p like in
V * V' * p
Now, since matrix multiplication has the associative property, we can write the above formula as
( V * V' ) * p
what can be interpreted as "moving the camera", or else as
V * ( V' * p )
what can be interpreted as "moving the world".