Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-03-31 14:41:15 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-03-31 14:48:17 +0300
commit2f7171622d784384053eb5094edaa81eb8133f0a (patch)
treeb73d5080845916f9b5ba60b7f2aa109c58300860 /source/blender/draw/intern/draw_manager_data.c
parentca37654b63277985a4f050772ddc412d8158a529 (diff)
DRW: Rename DRW_shgroup_uniform_vec4_array_copy to mat4_copy
This function was not used for anything other than mat4. This was because of a limitation of the DRW module/ This makes it cleaner for the GLSL and also less tempting to use it for other unconventional purpose.
Diffstat (limited to 'source/blender/draw/intern/draw_manager_data.c')
-rw-r--r--source/blender/draw/intern/draw_manager_data.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index 2c9ebfc080e..f7d7c77969e 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -485,10 +485,9 @@ void DRW_shgroup_uniform_vec4_copy(DRWShadingGroup *shgroup, const char *name, c
drw_shgroup_uniform(shgroup, name, DRW_UNIFORM_FLOAT_COPY, value, 4, 1);
}
-void DRW_shgroup_uniform_vec4_array_copy(DRWShadingGroup *shgroup,
- const char *name,
- const float (*value)[4],
- int arraysize)
+void DRW_shgroup_uniform_mat4_copy(DRWShadingGroup *shgroup,
+ const char *name,
+ const float (*value)[4])
{
int location = GPU_shader_get_uniform(shgroup->shader, name);
@@ -502,9 +501,8 @@ void DRW_shgroup_uniform_vec4_array_copy(DRWShadingGroup *shgroup,
* All entries from the same array share the same base location,
* and array-size used to determine the number of elements
* copied in draw_update_uniforms. */
- for (int i = 0; i < arraysize; i++) {
- drw_shgroup_uniform_create_ex(
- shgroup, location, DRW_UNIFORM_FLOAT_COPY, &value[i], 0, 4, arraysize);
+ for (int i = 0; i < 4; i++) {
+ drw_shgroup_uniform_create_ex(shgroup, location, DRW_UNIFORM_FLOAT_COPY, &value[i], 0, 4, 4);
}
}