diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-17 13:34:06 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-17 13:34:06 +0300 |
commit | 3c799ba8013405142430d7e20c272fe92457852d (patch) | |
tree | ca2a9aa891492b522f7ed32ce4a59142ffce7731 /source/blender/draw/intern/draw_common.h | |
parent | 11c167ff763528dd0c3a5487f1dc3a49bcabef1a (diff) |
DwM: Armature: Add distance outline and wire drawing of envelope bones.
This is not complete, it does not implement 3D solid drawing of
envelope bones. 2D wire is hence always drawn for now.
Some notes:
I did not try to implement the 'capsule' approach suggested by @fclem, because:
1. I spent enough time on this already, and finally got something working.
2. I managed to get rid of geometry shader completely.
3. Current approach allows us to use same shader for
distance outline and envelope wire.
It's working fine, except for one glitch - superpositions of envelope
outlines do not work as expected, not sure what's wrong here, tried to
disable zbuff, enable GL_BLEND, no luck so far...
I think we need our own 'background' drawpass to get them working (also
to avoid them drawing over the wire lines).
Diffstat (limited to 'source/blender/draw/intern/draw_common.h')
-rw-r--r-- | source/blender/draw/intern/draw_common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_common.h b/source/blender/draw/intern/draw_common.h index d7ec08b2394..0ca754a6417 100644 --- a/source/blender/draw/intern/draw_common.h +++ b/source/blender/draw/intern/draw_common.h @@ -101,6 +101,7 @@ struct DRWShadingGroup *shgroup_instance(struct DRWPass *pass, struct Batch *geo struct DRWShadingGroup *shgroup_camera_instance(struct DRWPass *pass, struct Batch *geom); struct DRWShadingGroup *shgroup_distance_lines_instance(struct DRWPass *pass, struct Batch *geom); struct DRWShadingGroup *shgroup_spot_instance(struct DRWPass *pass, struct Batch *geom); +struct DRWShadingGroup *shgroup_instance_bone_envelope(struct DRWPass *pass, struct Batch *geom, float (*obmat)[4]); int DRW_object_wire_theme_get(struct Object *ob, struct SceneLayer *sl, float **r_color); float *DRW_color_background_blend_get(int theme_id); |