GPU: Fix wrong 2D shader used from 3D drawing

Regression introduced by d165d6aa2a.
This commit is contained in:
Clément Foucault 2023-02-14 18:14:18 +01:00
parent acf7f46b77
commit f4db58844d
3 changed files with 3 additions and 3 deletions

View File

@ -279,7 +279,7 @@ static void annotation_draw_stroke_point(const bGPDspoint *points,
immBindBuiltinProgram(GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
}
else {
immBindBuiltinProgram(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
immBindBuiltinProgram(GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
/* get 2D coordinates of point */
float co[3] = {0.0f};

View File

@ -966,7 +966,7 @@ static void min_distance_edit_draw(bContext *C, int /*x*/, int /*y*/, void *cust
const uint pos3d = GPU_vertformat_attr_add(format3d, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
const uint col3d = GPU_vertformat_attr_add(format3d, "color", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
immBindBuiltinProgram(GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
immUniform1f("size", 4.0f);
immBegin(GPU_PRIM_POINTS, points_wo.size());

View File

@ -1104,7 +1104,7 @@ static void draw_rotation_guide(const RegionView3D *rv3d)
immUnbindProgram();
/* -- draw rotation center -- */
immBindBuiltinProgram(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
immBindBuiltinProgram(GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA);
immUniform1f("size", 7.0f);
immBegin(GPU_PRIM_POINTS, 1);
immAttr4ubv(col, color);