Files
asarium 56dc373bb9 Add support for using Vulkan GLSL code with OpenGL
This is an effort to be able to use the same GLSL code for both Vulkan
and OpenGL. This is done by first compiling the Vulkan GLSL code to
SPIR-V and then using a custom tool (which uses SPIRV-Cross) to convert
that back into GLSL 1.50 compatible code.

The required tool will be downloaded by CMake when glslc is found in the
path. This is included in the Vulkan SDK. To avoid having a hard
dependency on this, the generated files are included in the VCS and are
only regenerated when glslc is found on the system.
2020-09-27 12:45:05 +02:00

30 lines
744 B
C

#pragma once
#include "globalincs/pstypes.h"
#include "lighting/lighting.h"
#include "cmdline/cmdline.h"
//Variables
extern int Num_active_gr_lights;
extern const float gr_light_color[4];
extern const float gr_light_zero[4];
extern const float gr_light_emission[4];
extern float gr_light_ambient[4];
extern float gr_user_ambient;
//Functions
void gr_set_light(light *fs_light);
void gr_reset_lighting();
void gr_set_lighting(bool set, bool state);
void gr_set_center_alpha(int type);
void gr_set_ambient_light(int red, int green, int blue);
void gr_calculate_ambient_factor(int ambient_factor = Cmdline_ambient_factor);
void gr_lighting_fill_uniforms(void* data_out, size_t buffer_size);
void gr_light_init();
void gr_light_shutdown();