Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/uvedit/uvedit_smart_stitch.c
| Show First 20 Lines • Show All 1,658 Lines • ▼ Show 20 Lines | static void stitch_calculate_edge_normal(BMEditMesh *em, UvEdge *edge, float *normal, float aspect) | ||||
| normalize_v2(normal); | normalize_v2(normal); | ||||
| } | } | ||||
| /** | /** | ||||
| */ | */ | ||||
| static void stitch_draw_vbo(GPUVertBuf *vbo, GPUPrimType prim_type, const float col[4]) | static void stitch_draw_vbo(GPUVertBuf *vbo, GPUPrimType prim_type, const float col[4]) | ||||
| { | { | ||||
| GPUBatch *batch = GPU_batch_create_ex(prim_type, vbo, NULL, GPU_BATCH_OWNS_VBO); | GPUBatch *batch = GPU_batch_create_ex(prim_type, vbo, NULL, GPU_BATCH_OWNS_VBO); | ||||
| GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_UNIFORM_COLOR); | GPU_batch_program_set_builtin(batch, GPU_SHADER_3D_UNIFORM_COLOR); | ||||
| GPU_batch_uniform_4fv(batch, "color", col); | GPU_batch_uniform_4fv(batch, "color", col); | ||||
| GPU_batch_draw(batch); | GPU_batch_draw(batch); | ||||
| GPU_batch_discard(batch); | GPU_batch_discard(batch); | ||||
| } | } | ||||
| /* TODO: make things prettier : store batches inside StitchPreviewer instead of the bare verts pos | /* TODO: make things prettier : store batches inside StitchPreviewer instead of the bare verts pos | ||||
| */ | */ | ||||
| static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void *arg) | static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void *arg) | ||||
| ▲ Show 20 Lines • Show All 1,089 Lines • Show Last 20 Lines | |||||