summaryrefslogtreecommitdiff
path: root/drivers/gles3
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp2
-rw-r--r--drivers/gles3/shader_gles3.cpp58
2 files changed, 30 insertions, 30 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 4759a2b0d0..f19b4a0ce2 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -1555,7 +1555,7 @@ void RasterizerStorageGLES3::_update_shader(Shader *p_shader) const {
p_shader->uniforms.clear();
- if (p_shader->code == String()) {
+ if (p_shader->code.is_empty()) {
return; //just invalid, but no error
}
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index 7d93d50ceb..2f26acf628 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -791,10 +791,10 @@ void ShaderGLES3::use_material(void *p_material) {
Transform2D tr = V->get();
GLfloat matrix[4] = {
/* build a 16x16 matrix */
- tr.elements[0][0],
- tr.elements[0][1],
- tr.elements[1][0],
- tr.elements[1][1],
+ (GLfloat)tr.elements[0][0],
+ (GLfloat)tr.elements[0][1],
+ (GLfloat)tr.elements[1][0],
+ (GLfloat)tr.elements[1][1],
};
glUniformMatrix2fv(location, 1, GL_FALSE, matrix);
@@ -804,15 +804,15 @@ void ShaderGLES3::use_material(void *p_material) {
Basis val = V->get();
GLfloat mat[9] = {
- val.elements[0][0],
- val.elements[1][0],
- val.elements[2][0],
- val.elements[0][1],
- val.elements[1][1],
- val.elements[2][1],
- val.elements[0][2],
- val.elements[1][2],
- val.elements[2][2],
+ (GLfloat)val.elements[0][0],
+ (GLfloat)val.elements[1][0],
+ (GLfloat)val.elements[2][0],
+ (GLfloat)val.elements[0][1],
+ (GLfloat)val.elements[1][1],
+ (GLfloat)val.elements[2][1],
+ (GLfloat)val.elements[0][2],
+ (GLfloat)val.elements[1][2],
+ (GLfloat)val.elements[2][2],
};
glUniformMatrix3fv(location, 1, GL_FALSE, mat);
@@ -822,22 +822,22 @@ void ShaderGLES3::use_material(void *p_material) {
case ShaderLanguage::TYPE_MAT4: {
Transform2D tr = V->get();
GLfloat matrix[16] = { /* build a 16x16 matrix */
- tr.elements[0][0],
- tr.elements[0][1],
- 0,
- 0,
- tr.elements[1][0],
- tr.elements[1][1],
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- tr.elements[2][0],
- tr.elements[2][1],
- 0,
- 1
+ (GLfloat)tr.elements[0][0],
+ (GLfloat)tr.elements[0][1],
+ (GLfloat)0,
+ (GLfloat)0,
+ (GLfloat)tr.elements[1][0],
+ (GLfloat)tr.elements[1][1],
+ (GLfloat)0,
+ (GLfloat)0,
+ (GLfloat)0,
+ (GLfloat)0,
+ (GLfloat)1,
+ (GLfloat)0,
+ (GLfloat)tr.elements[2][0],
+ (GLfloat)tr.elements[2][1],
+ (GLfloat)0,
+ (GLfloat)1
};
glUniformMatrix4fv(location, 1, GL_FALSE, matrix);