Shaders: Use const char * for filenames.

This commit is contained in:
Brandon Wright 2020-06-30 16:53:52 -05:00
parent 341a6c7aea
commit 38bcabff68
2 changed files with 4 additions and 4 deletions

View File

@ -87,7 +87,7 @@ static const char *wrap_mode_enum_to_string(int val)
} }
bool GLSLShader::load_shader_preset_file(char *filename) bool GLSLShader::load_shader_preset_file(const char *filename)
{ {
char key[256]; char key[256];
int length = strlen(filename); int length = strlen(filename);
@ -433,7 +433,7 @@ GLuint GLSLShader::compile_shader(std::vector<std::string> &lines,
return status; return status;
} }
bool GLSLShader::load_shader(char *filename) bool GLSLShader::load_shader(const char *filename)
{ {
char shader_path[PATH_MAX]; char shader_path[PATH_MAX];
char temp[PATH_MAX]; char temp[PATH_MAX];

View File

@ -156,8 +156,8 @@ typedef struct
typedef struct typedef struct
{ {
bool load_shader(char *filename); bool load_shader(const char *filename);
bool load_shader_preset_file(char *filename); bool load_shader_preset_file(const char *filename);
void render(GLuint &orig, int width, int height, int viewport_x, void render(GLuint &orig, int width, int height, int viewport_x,
int viewport_y, int viewport_width, int viewport_height, int viewport_y, int viewport_width, int viewport_height,
GLSLViewportCallback vpcallback); GLSLViewportCallback vpcallback);