Moving on to cubemaps.

This commit is contained in:
Zed A. Shaw 2026-09-03 14:51:53 -04:00
parent 9c75238461
commit 87c513b9f0
113 changed files with 15511 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#include "screen.hpp"
#include <glad/glad.h>
#include <GLFW/glfw3.h>
void Screen::init() {
shader.use();
shader.setInt("screenTexture", 0);
glGenVertexArrays(1, &target_VAO);
glGenBuffers(1, &target_VBO);
glBindVertexArray(target_VAO);
glBindBuffer(GL_ARRAY_BUFFER, target_VBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), &vertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void *)0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)(2 * sizeof(float)));
}