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:
authorGermano <germano.costa@ig.com.br>2017-11-16 20:12:32 +0300
committerGermano <germano.costa@ig.com.br>2017-11-16 20:12:32 +0300
commit88c88c4610260ef3d00420c3e9fc3c1cd56aad14 (patch)
treeb9e49f253fd37c773c2098b583019e2240655885 /source/blender/draw/intern/draw_common.c
parent562da211c21bc57e35d7b2dba2f36c2472de90a2 (diff)
Fix T51210: Draw Manager: Support for Metaball Drawing
Differential Revision: D2914
Diffstat (limited to 'source/blender/draw/intern/draw_common.c')
-rw-r--r--source/blender/draw/intern/draw_common.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c
index 125edcbc5d2..bb7b4d7d513 100644
--- a/source/blender/draw/intern/draw_common.c
+++ b/source/blender/draw/intern/draw_common.c
@@ -352,6 +352,19 @@ DRWShadingGroup *shgroup_instance_bone_envelope_solid(DRWPass *pass, struct Gwn_
return grp;
}
+DRWShadingGroup *shgroup_instance_mball_helpers(DRWPass *pass, struct Gwn_Batch *geom)
+{
+ GPUShader *sh = GPU_shader_get_builtin_shader(GPU_SHADER_3D_INSTANCE_MBALL_HELPERS);
+
+ DRWShadingGroup *grp = DRW_shgroup_instance_create(sh, pass, geom);
+ DRW_shgroup_attrib_float(grp, "ScaleTranslationMatrix", 12);
+ DRW_shgroup_attrib_float(grp, "radius", 1);
+ DRW_shgroup_attrib_float(grp, "color", 3);
+ DRW_shgroup_uniform_vec3(grp, "screen_vecs[0]", DRW_viewport_screenvecs_get(), 2);
+
+ return grp;
+}
+
/* ******************************************** COLOR UTILS *********************************************** */