I'm trying to implement a 2D camera in modern OpenGL.
Before I moved over to OpenGL, I used SDL to make my games and their concept of a camera is by creating a camera quad and each time the camera moves, objects is being offset by this camera quad's position, giving the effect that the game world is scrolling when the camera moves.
I have a working 3D camera at the moment, which are using a view matrix and a look at-matrix to construct the final view projection matrix, which are then sent to the shader(s). So I know the concept of an actual camera.
I have checked a few tutorials and code examples that are using a orthographic matrix to create the 2D camera, followed by calling glViewport to construct the viewport of the game. However, none of the tutorials (and such) that I've watched is using the orthographic camera and the glViewport to actually scroll the camera and are instead only using it to render HUD objects and such.
How is a scrolling 2D camera usually made in OpenGL? Using the same concept of a 2D camera as SDL uses or are the matrices used to offset the objects being affected by the 2D camera? I am having a hard time understanding the concept of a orthographic camera aswell.