mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-27 21:48:31 +00:00
Corrected namings
This commit is contained in:
16
src/rlgl.c
16
src/rlgl.c
@@ -2425,12 +2425,12 @@ static void LoadDefaultShaderLocations(Shader *shader)
|
|||||||
// vertex texcoord2 location = 5
|
// vertex texcoord2 location = 5
|
||||||
|
|
||||||
// Get handles to GLSL input attibute locations
|
// Get handles to GLSL input attibute locations
|
||||||
shader->vertexLoc = glGetAttribLocation(shader->id, "vertexPosition");
|
shader->vertexLoc = glGetAttribLocation(shader->id, DEFAULT_ATTRIB_POSITION_NAME);
|
||||||
shader->texcoordLoc = glGetAttribLocation(shader->id, "vertexTexCoord");
|
shader->texcoordLoc = glGetAttribLocation(shader->id, DEFAULT_ATTRIB_TEXCOORD_NAME);
|
||||||
shader->normalLoc = glGetAttribLocation(shader->id, "vertexNormal");
|
shader->normalLoc = glGetAttribLocation(shader->id, DEFAULT_ATTRIB_NORMAL_NAME);
|
||||||
shader->colorLoc = glGetAttribLocation(shader->id, "vertexColor");
|
shader->colorLoc = glGetAttribLocation(shader->id, DEFAULT_ATTRIB_COLOR_NAME);
|
||||||
shader->tangentLoc = glGetAttribLocation(shader->id, "vertexTangent");
|
shader->tangentLoc = glGetAttribLocation(shader->id, DEFAULT_ATTRIB_TANGENT_NAME);
|
||||||
shader->texcoord2Loc = glGetAttribLocation(shader->id, "vertexTexCoord2");
|
shader->texcoord2Loc = glGetAttribLocation(shader->id, DEFAULT_ATTRIB_TEXCOORD2_NAME);
|
||||||
|
|
||||||
// Get handles to GLSL uniform locations (vertex shader)
|
// Get handles to GLSL uniform locations (vertex shader)
|
||||||
shader->mvpLoc = glGetUniformLocation(shader->id, "mvpMatrix");
|
shader->mvpLoc = glGetUniformLocation(shader->id, "mvpMatrix");
|
||||||
@@ -2447,8 +2447,8 @@ static void UnloadDefaultShader(void)
|
|||||||
{
|
{
|
||||||
glUseProgram(0);
|
glUseProgram(0);
|
||||||
|
|
||||||
//glDetachShader(defaultShaderProgram, vertexShader);
|
//glDetachShader(defaultShader, vertexShader);
|
||||||
//glDetachShader(defaultShaderProgram, fragmentShader);
|
//glDetachShader(defaultShader, fragmentShader);
|
||||||
//glDeleteShader(vertexShader); // Already deleted on shader compilation
|
//glDeleteShader(vertexShader); // Already deleted on shader compilation
|
||||||
//glDeleteShader(fragmentShader); // Already deleted on sahder compilation
|
//glDeleteShader(fragmentShader); // Already deleted on sahder compilation
|
||||||
glDeleteProgram(defaultShader.id);
|
glDeleteProgram(defaultShader.id);
|
||||||
|
Reference in New Issue
Block a user