summaryrefslogtreecommitdiff
path: root/drivers/gles3/shader_gles3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/shader_gles3.cpp')
-rw-r--r--drivers/gles3/shader_gles3.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index 7d93d50ceb..474a80aca1 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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);