Framebuffer first
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include "display/render.h"
|
||||
|
||||
void cameraUIPush(void) {
|
||||
// Push the UI camera matrix onto the stack.
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(
|
||||
@@ -20,6 +19,32 @@ void cameraUIPush(void) {
|
||||
}
|
||||
|
||||
void cameraUIPop(void) {
|
||||
// Pop the UI camera matrix from the stack.
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
void cameraScreenPush(void) {
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
#if RENDER_USE_FRAMEBUFFER
|
||||
int32_t windowWidth, windowHeight;
|
||||
SDL_GetWindowSize(RENDER_WINDOW, &windowWidth, &windowHeight);
|
||||
|
||||
glViewport(0, 0, windowWidth, windowHeight);
|
||||
glOrtho(
|
||||
0.0f, (float_t)windowWidth,
|
||||
(float_t)windowHeight, 0.0f,
|
||||
-1.0f, 1.0f
|
||||
);
|
||||
#else
|
||||
glOrtho(
|
||||
0.0f, (float_t)RENDER_WIDTH,
|
||||
(float_t)RENDER_HEIGHT, 0.0f,
|
||||
-1.0f, 1.0f
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
void cameraScreenPop(void) {
|
||||
glPopMatrix();
|
||||
}
|
Reference in New Issue
Block a user