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:
authorCampbell Barton <campbell@blender.org>2022-01-31 05:01:29 +0300
committerCampbell Barton <campbell@blender.org>2022-01-31 06:10:08 +0300
commit8815f2f11632ea84d706bacd18e60639cb13d6eb (patch)
treea1f479191ee6388c023e99ad8780ada8d6d0562e /source/blender/editors/include/ED_armature.h
parent9ccdad8a2173e14848fbfa5401210d8ffb074352 (diff)
Cleanup: use struct for GPU the select buffer
GPU_select originally used GL_SELECT which defined the format for storing the selection result. Now this is no longer the case, define our own struct - making the code easier to follow: - Avoid having to deal with arrays in both `uint*` and `uint(*)[4]` multiplying offsets by 4 in some cases & not others. - No magic numbers for the offsets of depth & selection-ID. - No need to allocate unused members to match GL_SELECT (halving the buffer size).
Diffstat (limited to 'source/blender/editors/include/ED_armature.h')
-rw-r--r--source/blender/editors/include/ED_armature.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 7631bd35e79..afba3c7b96a 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -35,6 +35,7 @@ struct Base;
struct Bone;
struct Depsgraph;
struct EditBone;
+struct GPUSelectResult;
struct ListBase;
struct Main;
struct Mesh;
@@ -157,22 +158,22 @@ int ED_armature_join_objects_exec(struct bContext *C, struct wmOperator *op);
struct Base *ED_armature_base_and_ebone_from_select_buffer(struct Base **bases,
uint bases_len,
- int hit,
+ unsigned int select_id,
struct EditBone **r_ebone);
struct Object *ED_armature_object_and_ebone_from_select_buffer(struct Object **objects,
uint objects_len,
- int hit,
+ unsigned int select_id,
struct EditBone **r_ebone);
struct Base *ED_armature_base_and_pchan_from_select_buffer(struct Base **bases,
uint bases_len,
- int hit,
+ unsigned int select_id,
struct bPoseChannel **r_pchan);
/**
* For callers that don't need the pose channel.
*/
struct Base *ED_armature_base_and_bone_from_select_buffer(struct Base **bases,
uint bases_len,
- int hit,
+ unsigned int select_id,
struct Bone **r_bone);
bool ED_armature_edit_deselect_all(struct Object *obedit);
bool ED_armature_edit_deselect_all_visible(struct Object *obedit);
@@ -334,7 +335,7 @@ void ED_armature_pose_select_pick_bone(struct ViewLayer *view_layer,
bool ED_armature_pose_select_pick_with_buffer(struct ViewLayer *view_layer,
struct View3D *v3d,
struct Base *base,
- const unsigned int *buffer,
+ const struct GPUSelectResult *buffer,
short hits,
bool extend,
bool deselect,