Shaders: Use C++ style struct types.

Supresses non-C-compatible warnings.
This commit is contained in:
BearOso 2020-08-07 14:59:03 -05:00
parent 4973d625ba
commit e58c16351c

View File

@ -34,15 +34,15 @@ enum GLSLFilter
GLSL_UNDEFINED = 0, GLSL_UNDEFINED = 0,
}; };
typedef struct struct GLSLUniformMetrics
{ {
GLint Texture; GLint Texture;
GLint InputSize; GLint InputSize;
GLint TextureSize; GLint TextureSize;
GLint TexCoord; GLint TexCoord;
} GLSLUniformMetrics; };
typedef struct struct GLSLUniforms
{ {
GLint Texture; GLint Texture;
GLint InputSize; GLint InputSize;
@ -67,7 +67,7 @@ typedef struct
GLSLUniformMetrics Pass[glsl_max_passes]; GLSLUniformMetrics Pass[glsl_max_passes];
GLSLUniformMetrics PassPrev[glsl_max_passes]; GLSLUniformMetrics PassPrev[glsl_max_passes];
GLint Lut[9]; GLint Lut[9];
} GLSLUniforms; };
// Size must always follow texture type // Size must always follow texture type
enum enum
@ -85,7 +85,7 @@ enum
SL_FEEDBACK = 10 SL_FEEDBACK = 10
}; };
typedef struct struct SlangUniform
{ {
// Source // Source
int type; int type;
@ -94,9 +94,9 @@ typedef struct
// Output // Output
GLint location; // -1 Indicates UBO GLint location; // -1 Indicates UBO
GLint offset; GLint offset;
} SlangUniform; };
typedef struct struct GLSLPass
{ {
char filename[PATH_MAX]; char filename[PATH_MAX];
char alias[256]; char alias[256];
@ -129,9 +129,9 @@ typedef struct
bool uses_feedback = false; bool uses_feedback = false;
GLuint feedback_texture; GLuint feedback_texture;
#endif #endif
} GLSLPass; };
typedef struct struct GLSLLut
{ {
char id[256]; char id[256];
char filename[PATH_MAX]; char filename[PATH_MAX];
@ -141,9 +141,9 @@ typedef struct
bool mipmap; bool mipmap;
int width; int width;
int height; int height;
} GLSLLut; };
typedef struct struct GLSLParam
{ {
char name[PATH_MAX]; char name[PATH_MAX];
char id[256]; char id[256];
@ -153,9 +153,9 @@ typedef struct
float step; float step;
int digits; int digits;
GLint unif[glsl_max_passes]; GLint unif[glsl_max_passes];
} GLSLParam; };
typedef struct struct GLSLShader
{ {
bool load_shader(const char *filename); bool load_shader(const char *filename);
bool load_shader_preset_file(const char *filename); bool load_shader_preset_file(const char *filename);
@ -196,6 +196,6 @@ typedef struct
bool using_feedback; bool using_feedback;
#endif #endif
} GLSLShader; };
#endif #endif