DRW: New function to retry stencil_mask value
This function is a workaround to use the stencil in grease pencil and reduce the number of clears. Reviewed by @fclem. Note: This function will be removed when draw manager supports stencil clearing by group.
This commit is contained in:
@@ -531,7 +531,11 @@ void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name,
|
||||
void DRW_shgroup_uniform_vec2_copy(DRWShadingGroup *shgroup, const char *name, const float *value);
|
||||
|
||||
bool DRW_shgroup_is_empty(DRWShadingGroup *shgroup);
|
||||
|
||||
/* TODO: workaround functions waiting for the clearing operation to be available inside the
|
||||
* shgroups. */
|
||||
DRWShadingGroup *DRW_shgroup_get_next(DRWShadingGroup *shgroup);
|
||||
uint DRW_shgroup_stencil_mask_get(DRWShadingGroup *shgroup);
|
||||
|
||||
/* Passes */
|
||||
DRWPass *DRW_pass_create(const char *name, DRWState state);
|
||||
|
||||
@@ -1003,6 +1003,13 @@ DRWShadingGroup *DRW_shgroup_get_next(DRWShadingGroup *shgroup)
|
||||
return shgroup->next;
|
||||
}
|
||||
|
||||
/* This is a workaround function waiting for the clearing operation to be available inside the
|
||||
* shgroups. */
|
||||
uint DRW_shgroup_stencil_mask_get(DRWShadingGroup *shgroup)
|
||||
{
|
||||
return shgroup->stencil_mask;
|
||||
}
|
||||
|
||||
DRWShadingGroup *DRW_shgroup_create_sub(DRWShadingGroup *shgroup)
|
||||
{
|
||||
DRWShadingGroup *shgroup_new = BLI_memblock_alloc(DST.vmempool->shgroups);
|
||||
|
||||
Reference in New Issue
Block a user