Camera
This commit is contained in:
25
src/dusksdl2/display/camera/camera.c
Normal file
25
src/dusksdl2/display/camera/camera.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "camera.h"
|
||||
#include "display/render.h"
|
||||
|
||||
void cameraUIPush(void) {
|
||||
// Push the UI camera matrix onto the stack.
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(
|
||||
0.0f, (float_t)RENDER_WIDTH,
|
||||
(float_t)RENDER_HEIGHT, 0.0f,
|
||||
-1.0f, 1.0f
|
||||
);
|
||||
}
|
||||
|
||||
void cameraUIPop(void) {
|
||||
// Pop the UI camera matrix from the stack.
|
||||
glPopMatrix();
|
||||
}
|
Reference in New Issue
Block a user