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

64 lines
1.3 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 {
2023-05-12 13:22:05 -05:00
struct gameobject *go;
uint8_t color[3];
float strength;
int dynamic;
int on;
2021-11-30 21:29:18 -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,
2023-05-12 13:22:05 -05:00
struct shader *shader, int num);
2022-11-19 17:13:57 -06:00
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,
2023-05-12 13:22:05 -05: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,
2023-05-12 13:22:05 -05:00
struct shader *shader);
2021-11-30 21:29:18 -06:00
struct mDirectionalLight *MakeDLight();
extern struct mDirectionalLight *dLight;
2021-11-30 21:29:18 -06:00
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