Shader first pass

This commit is contained in:
2026-03-17 08:42:43 -05:00
parent 7356286fe0
commit ff92a78dda
24 changed files with 634 additions and 87 deletions

View File

@@ -8,7 +8,7 @@
#include "display/camera/camera.h"
#include "display/framebuffer/framebuffer.h"
#include "display/screen/screen.h"
#include "assert/assert.h"
#include "assert/assertgl.h"
void cameraPushMatrixGL(camera_t *camera) {
assertNotNull(camera, "Not a camera component");
@@ -117,16 +117,19 @@ void cameraPushMatrixGL(camera_t *camera) {
assertUnreachable("Invalid camera view type");
}
glPushMatrix();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glLoadMatrixf((const GLfloat*)projection);
// glPushMatrix();
// glMatrixMode(GL_PROJECTION);
// glLoadIdentity();
// glLoadMatrixf((const GLfloat*)projection);
assertNoGLError("Failed to set projection matrix");
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glLoadMatrixf((const GLfloat*)view);
// glMatrixMode(GL_MODELVIEW);
// glLoadIdentity();
// glLoadMatrixf((const GLfloat*)view);
assertNoGLError("Failed to set view matrix");
}
void cameraPopMatrixGL(void) {
glPopMatrix();
// glPopMatrix();
assertNoGLError("Failed to pop camera matrix");
}