Review const char *
This commit is contained in:
parent
ee049641ba
commit
99ee26b001
2 changed files with 5 additions and 5 deletions
|
@ -236,7 +236,7 @@ unsigned int whiteTexture;
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
static void LoadCompressedTexture(unsigned char *data, int width, int height, int mipmapCount, int compressedFormat);
|
static void LoadCompressedTexture(unsigned char *data, int width, int height, int mipmapCount, int compressedFormat);
|
||||||
static unsigned int LoadShaderProgram(char *vShaderStr, char *fShaderStr); // Load custom shader strings and return program id
|
static unsigned int LoadShaderProgram(const char *vShaderStr, const char *fShaderStr); // Load custom shader strings and return program id
|
||||||
|
|
||||||
static Shader LoadDefaultShader(void); // Load default shader (just vertex positioning and texture coloring)
|
static Shader LoadDefaultShader(void); // Load default shader (just vertex positioning and texture coloring)
|
||||||
static Shader LoadStandardShader(void); // Load standard shader (support materials and lighting)
|
static Shader LoadStandardShader(void); // Load standard shader (support materials and lighting)
|
||||||
|
@ -2403,7 +2403,7 @@ static void LoadCompressedTexture(unsigned char *data, int width, int height, in
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load custom shader strings and return program id
|
// Load custom shader strings and return program id
|
||||||
static unsigned int LoadShaderProgram(char *vShaderStr, char *fShaderStr)
|
static unsigned int LoadShaderProgram(const char *vShaderStr, const char *fShaderStr)
|
||||||
{
|
{
|
||||||
unsigned int program = 0;
|
unsigned int program = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
// Vertex shader definition to embed, no external file required
|
// Vertex shader definition to embed, no external file required
|
||||||
const static unsigned char vStandardShaderStr[] =
|
static const char vStandardShaderStr[] =
|
||||||
#if defined(GRAPHICS_API_OPENGL_21)
|
#if defined(GRAPHICS_API_OPENGL_21)
|
||||||
"#version 120 \n"
|
"#version 120 \n"
|
||||||
#elif defined(GRAPHICS_API_OPENGL_ES2)
|
#elif defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
|
@ -37,7 +37,7 @@ const static unsigned char vStandardShaderStr[] =
|
||||||
"} \n";
|
"} \n";
|
||||||
|
|
||||||
// Fragment shader definition to embed, no external file required
|
// Fragment shader definition to embed, no external file required
|
||||||
const static unsigned char fStandardShaderStr[] =
|
static const char fStandardShaderStr[] =
|
||||||
#if defined(GRAPHICS_API_OPENGL_21)
|
#if defined(GRAPHICS_API_OPENGL_21)
|
||||||
"#version 120 \n"
|
"#version 120 \n"
|
||||||
#elif defined(GRAPHICS_API_OPENGL_ES2)
|
#elif defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
|
@ -163,4 +163,4 @@ const static unsigned char fStandardShaderStr[] =
|
||||||
#elif defined(GRAPHICS_API_OPENGL_ES2) || defined(GRAPHICS_API_OPENGL_21)
|
#elif defined(GRAPHICS_API_OPENGL_ES2) || defined(GRAPHICS_API_OPENGL_21)
|
||||||
" gl_FragColor = vec4(texelColor.rgb*lighting*colDiffuse.rgb, texelColor.a*colDiffuse.a); \n"
|
" gl_FragColor = vec4(texelColor.rgb*lighting*colDiffuse.rgb, texelColor.a*colDiffuse.a); \n"
|
||||||
#endif
|
#endif
|
||||||
"} \n";
|
"}\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue