mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-24 15:53: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.
33 lines
555 B
C
33 lines
555 B
C
#include <portablegl.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct TransSimpleUniforms
|
|
{
|
|
pgl_mat4 projMat;
|
|
pgl_vec2 texSizeInv;
|
|
pgl_vec2 translation;
|
|
GLuint frozenScene;
|
|
GLuint currentScene;
|
|
float prog;
|
|
};
|
|
|
|
struct TransSimpleAttribs
|
|
{
|
|
pgl_vec2 position;
|
|
pgl_vec2 texCoord;
|
|
};
|
|
|
|
struct TransSimpleVarying
|
|
{
|
|
pgl_vec2 v_texCoord;
|
|
};
|
|
|
|
void mkxpTransSimpleVS(float *output, pgl_vec4 *attribs, Shader_Builtins *builtins, void *uniforms);
|
|
void mkxpTransSimpleFS(float *input, Shader_Builtins *builtins, void *uniforms);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|