Implement the red windows.

This commit is contained in:
Zed A. Shaw 2026-08-30 13:17:35 -04:00
parent 11b7f4a3ed
commit f51df89054
18 changed files with 74 additions and 36 deletions

View file

@ -2,7 +2,7 @@
#include <glm/glm.hpp>
#include <vector>
#include <map>
#include <unordered_map>
#include "json.hpp"
const unsigned int SCR_WIDTH = 800;
@ -34,6 +34,7 @@ namespace components {
float quadratic=0.0f;
float cut_off=0.0f;
float outer_cut_off=0.0f;
bool on=true;
void adjust(float amount) {
ambient += amount;
@ -46,7 +47,7 @@ namespace components {
position, direction,
ambient, diffuse, specular,
constant, linear, quadratic,
cut_off, outer_cut_off);
cut_off, outer_cut_off, on);
struct Lighting {
std::vector<Light> directional;
@ -102,8 +103,8 @@ namespace components {
struct Scene {
components::Shader shader;
components::Shader light_shader;
std::map<std::string, Material> materials;
std::map<std::string, Model> models;
std::unordered_map<std::string, Material> materials;
std::unordered_map<std::string, Model> models;
std::vector<Thing> things;
Camera camera;
Lighting light;