A small OpenGL 3+ renderer and game engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
615 B

#pragma once
#include <glm/glm.hpp>
#include "shader_program.h"
#include "util.h"
struct point_light
{
uint light_ID;
glm::vec3 position;
glm::vec3 color;
float intensity;
};
struct light_group
{
point_light* lights;
uint num_lights;
uint max_lights;
bool needs_update;
};
// NOTE: max_lights should match the max_lights variable in the fragment shader
light_group* lightsInit(uint max_lights = 1000);
void lightsOut(light_group* lights);
bool
lightsAdd(light_group* lights, glm::vec3 pos, glm::vec3 color, float intensity);
void lightsUpdate(light_group* lights, default_shader_program* shader);