Commit Graph

6 Commits

Author SHA1 Message Date
Hans Goudey 5993c517bd Cleanup: Use C++ Array, Span, int2 for lasso coords 2024-03-05 11:29:04 -05:00
Hans Goudey 9ab356fe6e Cleanup: Return Vector for View Layer objects and bases retrieval
This simplifies code using these functions because of RAII,
range based for loops, and the lack of output arguments.
Also pass object pointer array as a span in more cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/117482
2024-01-24 18:18:14 +01:00
Hans Goudey 34e39c6b53 Cleanup: Add missing include and forward declaration to DRW header 2024-01-15 08:31:19 -05:00
Germano Cavalcante ffaf3e30ef DRW: Simplify Selection Engine
The selection engine has some complex tricks that improve performance.
These are:
- Only draws objects whose bounding box intersects the selection
threshold;
- If the viewport or objects are not "dirty", it does not clean the
texture IDs and only adds objects that have not yet been drawn;
- Only updates the depth buffer if a new object is drawn;
- Skip drawing if no object is found;

These tricks were initially implemented so that this engine could be
used for snapping.

But this initial idea has changed and now the engine is only used to
select Vertices, Edges or Faces.

Due to this limited use, these tricks bring no real benefit.
In fact, it's even worse with the Retopology Overlay, as it forces the
Depth buffer to be redrawn.

This commit removes these tricks and only keeps those that indicate
whether the drawing needs to be updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/113308
2023-10-09 11:06:53 -03:00
Germano Cavalcante 72a52520db Select Engine: Use C++ vector types for arrays
No functional changes.
2023-10-04 14:44:46 -03:00
Germano Cavalcante 99a3a4a330 Cleanup: Move select engine headers to C++
See #103343

tmp
2023-10-04 14:34:12 -03:00