prosperon/source/engine/3d/light.h

64 lines
1.2 KiB
C
Raw Normal View History

2021-11-30 21:29:18 -06:00
#ifndef LIGHT_H
#define LIGHT_H
2022-02-06 10:14:57 -06:00
#include <stdint.h>
2021-11-30 21:29:18 -06:00
struct mLight {
2022-11-19 17:13:57 -06:00
struct gameobject *go;
2022-02-06 10:14:57 -06:00
uint8_t color[3];
2021-11-30 21:29:18 -06:00
float strength;
int dynamic;
int on;
};
2022-02-06 10:14:57 -06:00
/*
2021-11-30 21:29:18 -06:00
struct mPointLight {
struct mLight light;
float constant;
float linear;
float quadratic;
};
struct mPointLight *MakePointlight();
void pointlight_prepshader(struct mPointLight *light,
2022-11-19 17:13:57 -06:00
struct shader *shader, int num);
void pointlights_prepshader(struct shader *shader);
2021-11-30 21:29:18 -06:00
struct mSpotLight {
struct mLight light;
float constant;
float linear;
float quadratic;
float distance;
float cutoff;
float outerCutoff;
};
struct mSpotLight *MakeSpotlight();
void spotlight_gui(struct mSpotLight *light);
2022-11-19 17:13:57 -06:00
void spotlight_prepshader(struct mSpotLight *light, struct shader *shader,
2021-11-30 21:29:18 -06:00
int num);
2022-11-19 17:13:57 -06:00
void spotlights_prepshader(struct shader *shader);
2021-11-30 21:29:18 -06:00
struct mDirectionalLight {
struct mLight light;
};
void dlight_prepshader(struct mDirectionalLight *light,
2022-11-19 17:13:57 -06:00
struct shader *shader);
2021-11-30 21:29:18 -06:00
struct mDirectionalLight *MakeDLight();
extern struct mDirectionalLight *dLight;
*/
2022-08-12 14:03:56 -05:00
void light_gui(struct mLight *light);
void pointlight_gui(struct mPointLight *light);
void spotlight_gui(struct mSpotLight *spot);
2021-11-30 21:29:18 -06:00
#endif