Skip to content

Commit

Permalink
Fix typo in 7bad170
Browse files Browse the repository at this point in the history
And cleanup.
  • Loading branch information
akien-mga committed Mar 1, 2019
1 parent 7bad170 commit e930fb9
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions drivers/gles2/shader_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ void ShaderGLES2::use_material(void *p_material) {
} break;

default: {
ERR_PRINT("type missing, bug?");
ERR_PRINT("ShaderNode type missing, bug?");
} break;
}
} else if (E->get().default_value.size()) {
Expand Down Expand Up @@ -970,7 +970,7 @@ void ShaderGLES2::use_material(void *p_material) {
// Nothing to do?
} break;
default: {
ERR_PRINT("type missing, bug?");
ERR_PRINT("ShaderNode type missing, bug?");
} break;
}
} else { //zero
Expand Down Expand Up @@ -1041,7 +1041,7 @@ void ShaderGLES2::use_material(void *p_material) {
} break;

case ShaderLanguage::TYPE_MAT2: {
GLfloat mat[4]{ 0, 0, 0, 0 };
GLfloat mat[4] = { 0, 0, 0, 0 };

glUniformMatrix2fv(location, 1, GL_FALSE, mat);
} break;
Expand All @@ -1054,22 +1054,7 @@ void ShaderGLES2::use_material(void *p_material) {
} break;

case ShaderLanguage::TYPE_MAT4: {
GLfloat mat[16] = { 0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0 };
GLfloat mat[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

glUniformMatrix4fv(location, 1, GL_FALSE, mat);

Expand Down Expand Up @@ -1104,7 +1089,7 @@ void ShaderGLES2::use_material(void *p_material) {
// Nothing to do?
} break;
default: {
ERR_PRINT("type missing, bug?");
ERR_PRINT("ShaderNode type missing, bug?");
} break;
}
}
Expand Down

0 comments on commit e930fb9

Please sign in to comment.