Advertisement

OpenGL Active or Passive Transformation

Started by December 11, 2016 07:40 PM
1 comment, last by haegarr 7 years, 11 months ago

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?

Advertisement

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".

However, due to the mathematical equivalence and the fact that OpenGL by itself does not override your data, I think the discussion is totally irrelevant.

This topic is closed to new replies.

Advertisement