This also happens in workbench. This is a culling issue.
The batch == nullptr
should be put only where necessary. For instance, any function that returns the result from DRW_batch_request
doesn't need a check.
Should be before armatures
. We don't want it to mess with edit drawing.
You don't need this to check selection. This is only useful if other members need to be initialized using it.
Isn't it better to try to unify with populate_cache_for_instance
into a single function?
I wish we had something like view_mat, projection_mat and view_projection_mat or something along those lines.
I think we can make a todo about this mass renaming.
BTW it is better for precision to use 2 matrix transform instead of persmat
. I think this is fine as is.
I think I may have think that winmat
was persmat
.
Nitpick: Reminder that /**
is only for multiline comments.
I am not sure this does any difference. In fact, I prefer keeping the transform on the normalized version vV
. It makes more sense to transform vV
as a direction than vP
.
I don't see why this is outdated? It is an explanation to why we use camera_curr.winmat
instead of drw_view.winmat
.