mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-23 23:33:45 +02:00

PortableGL supports shaders, but requires them to be compiled ahead-of-time to C or C++. I'll write a compiler later to translate from GLSL to this format automatically at build time.
23 lines
390 B
C
23 lines
390 B
C
#include <portablegl.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct FlatColorUniforms
|
|
{
|
|
pgl_mat4 projMat;
|
|
pgl_vec4 color;
|
|
};
|
|
|
|
struct FlatColorAttribs
|
|
{
|
|
pgl_vec2 position;
|
|
};
|
|
|
|
void mkxpFlatColorVS(float *_output, pgl_vec4 *attribs, Shader_Builtins *builtins, void *uniforms);
|
|
void mkxpFlatColorFS(float *input, Shader_Builtins *builtins, void *uniforms);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|