Skip to content

Commit

Permalink
Shaders: Use C++ style struct types.
Browse files Browse the repository at this point in the history
Supresses non-C-compatible warnings.
  • Loading branch information
bearoso committed Aug 7, 2020
1 parent 4973d62 commit e58c163
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions shaders/glsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ enum GLSLFilter
GLSL_UNDEFINED = 0,
};

typedef struct
struct GLSLUniformMetrics
{
GLint Texture;
GLint InputSize;
GLint TextureSize;
GLint TexCoord;
} GLSLUniformMetrics;
};

typedef struct
struct GLSLUniforms
{
GLint Texture;
GLint InputSize;
Expand All @@ -67,7 +67,7 @@ typedef struct
GLSLUniformMetrics Pass[glsl_max_passes];
GLSLUniformMetrics PassPrev[glsl_max_passes];
GLint Lut[9];
} GLSLUniforms;
};

// Size must always follow texture type
enum
Expand All @@ -85,7 +85,7 @@ enum
SL_FEEDBACK = 10
};

typedef struct
struct SlangUniform
{
// Source
int type;
Expand All @@ -94,9 +94,9 @@ typedef struct
// Output
GLint location; // -1 Indicates UBO
GLint offset;
} SlangUniform;
};

typedef struct
struct GLSLPass
{
char filename[PATH_MAX];
char alias[256];
Expand Down Expand Up @@ -129,9 +129,9 @@ typedef struct
bool uses_feedback = false;
GLuint feedback_texture;
#endif
} GLSLPass;
};

typedef struct
struct GLSLLut
{
char id[256];
char filename[PATH_MAX];
Expand All @@ -141,9 +141,9 @@ typedef struct
bool mipmap;
int width;
int height;
} GLSLLut;
};

typedef struct
struct GLSLParam
{
char name[PATH_MAX];
char id[256];
Expand All @@ -153,9 +153,9 @@ typedef struct
float step;
int digits;
GLint unif[glsl_max_passes];
} GLSLParam;
};

typedef struct
struct GLSLShader
{
bool load_shader(const char *filename);
bool load_shader_preset_file(const char *filename);
Expand Down Expand Up @@ -196,6 +196,6 @@ typedef struct

bool using_feedback;
#endif
} GLSLShader;
};

#endif

0 comments on commit e58c163

Please sign in to comment.