diff options
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 12 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 61 |
2 files changed, 1 insertions, 72 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index d43a0e97d24..1c943c18ed3 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -377,14 +377,7 @@ struct GPUVertFormat *DRW_shgroup_instance_format_array(const DRWInstanceAttrFor DRWShadingGroup *DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass); DRWShadingGroup *DRW_shgroup_create_sub(DRWShadingGroup *shgroup); DRWShadingGroup *DRW_shgroup_material_create(struct GPUMaterial *material, DRWPass *pass); -DRWShadingGroup *DRW_shgroup_material_instance_create(struct GPUMaterial *material, - DRWPass *pass, - struct GPUBatch *geom, - struct Object *ob, - struct GPUVertFormat *format); -DRWShadingGroup *DRW_shgroup_material_empty_tri_batch_create(struct GPUMaterial *material, - DRWPass *pass, - int size); + DRWShadingGroup *DRW_shgroup_instance_create(struct GPUShader *shader, DRWPass *pass, struct GPUBatch *geom, @@ -394,9 +387,6 @@ DRWShadingGroup *DRW_shgroup_line_batch_create_with_format(struct GPUShader *sha DRWPass *pass, struct GPUVertFormat *format); DRWShadingGroup *DRW_shgroup_line_batch_create(struct GPUShader *shader, DRWPass *pass); -DRWShadingGroup *DRW_shgroup_empty_tri_batch_create(struct GPUShader *shader, - DRWPass *pass, - int size); DRWShadingGroup *DRW_shgroup_transform_feedback_create(struct GPUShader *shader, DRWPass *pass, struct GPUVertBuf *tf_target); diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 3a6a7300cea..480802e0748 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -1030,44 +1030,6 @@ DRWShadingGroup *DRW_shgroup_material_create(struct GPUMaterial *material, DRWPa return shgroup; } -DRWShadingGroup *DRW_shgroup_material_instance_create( - struct GPUMaterial *material, DRWPass *pass, GPUBatch *geom, Object *ob, GPUVertFormat *format) -{ - GPUPass *gpupass = GPU_material_get_pass(material); - DRWShadingGroup *shgroup = drw_shgroup_material_create_ex(gpupass, pass); - - if (shgroup) { - shgroup->type = DRW_SHG_INSTANCE; - shgroup->instance_geom = geom; - drw_call_calc_orco(ob, shgroup->instance_orcofac); - drw_shgroup_instance_init(shgroup, GPU_pass_shader_get(gpupass), geom, format); - drw_shgroup_material_inputs(shgroup, material); - } - - return shgroup; -} - -DRWShadingGroup *DRW_shgroup_material_empty_tri_batch_create(struct GPUMaterial *material, - DRWPass *pass, - int tri_count) -{ -#ifdef USE_GPU_SELECT - BLI_assert((G.f & G_FLAG_PICKSEL) == 0); -#endif - GPUPass *gpupass = GPU_material_get_pass(material); - DRWShadingGroup *shgroup = drw_shgroup_material_create_ex(gpupass, pass); - - if (shgroup) { - /* Calling drw_shgroup_init will cause it to call GPU_draw_primitive(). */ - drw_shgroup_init(shgroup, GPU_pass_shader_get(gpupass)); - shgroup->type = DRW_SHG_TRIANGLE_BATCH; - shgroup->instance_count = tri_count * 3; - drw_shgroup_material_inputs(shgroup, material); - } - - return shgroup; -} - DRWShadingGroup *DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass) { DRWShadingGroup *shgroup = drw_shgroup_create_ex(shader, pass); @@ -1120,29 +1082,6 @@ DRWShadingGroup *DRW_shgroup_line_batch_create(struct GPUShader *shader, DRWPass return DRW_shgroup_line_batch_create_with_format(shader, pass, g_pos_format); } -/** - * Very special batch. Use this if you position - * your vertices with the vertex shader - * and dont need any VBO attribute. - */ -DRWShadingGroup *DRW_shgroup_empty_tri_batch_create(struct GPUShader *shader, - DRWPass *pass, - int tri_count) -{ -#ifdef USE_GPU_SELECT - BLI_assert((G.f & G_FLAG_PICKSEL) == 0); -#endif - DRWShadingGroup *shgroup = drw_shgroup_create_ex(shader, pass); - - /* Calling drw_shgroup_init will cause it to call GPU_draw_primitive(). */ - drw_shgroup_init(shgroup, shader); - - shgroup->type = DRW_SHG_TRIANGLE_BATCH; - shgroup->instance_count = tri_count * 3; - - return shgroup; -} - DRWShadingGroup *DRW_shgroup_transform_feedback_create(struct GPUShader *shader, DRWPass *pass, GPUVertBuf *tf_target) |