Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_common.c
| Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Lines | DRWShadingGroup *shgroup_instance_bone_envelope_solid(DRWPass *pass, struct Gwn_Batch *geom, float (*obmat)[4]) | ||||
| DRW_shgroup_attrib_float(grp, "radius_head", 1); | DRW_shgroup_attrib_float(grp, "radius_head", 1); | ||||
| DRW_shgroup_attrib_float(grp, "radius_tail", 1); | DRW_shgroup_attrib_float(grp, "radius_tail", 1); | ||||
| DRW_shgroup_uniform_mat4(grp, "ObjectModelMatrix", (float *)obmat); | DRW_shgroup_uniform_mat4(grp, "ObjectModelMatrix", (float *)obmat); | ||||
| DRW_shgroup_uniform_vec3(grp, "light", light, 1); | DRW_shgroup_uniform_vec3(grp, "light", light, 1); | ||||
| return grp; | 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 *********************************************** */ | /* ******************************************** COLOR UTILS *********************************************** */ | ||||
| /* TODO FINISH */ | /* TODO FINISH */ | ||||
| /** | /** | ||||
| * Get the wire color theme_id of an object based on it's state | * Get the wire color theme_id of an object based on it's state | ||||
| * \a r_color is a way to get a pointer to the static color var associated | * \a r_color is a way to get a pointer to the static color var associated | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines | |||||