GPU: refactor clipped drawing from DRW into GPU
authorCampbell Barton <ideasman42@gmail.com>
Tue, 5 Feb 2019 22:15:16 +0000 (09:15 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 5 Feb 2019 22:15:16 +0000 (09:15 +1100)
commitdbd7f36da8ec3ac1c2898aee346beecb86aac8a2
tree0d77061a4305b7bcfef13bb753089e5f6f21e7c3
parenta245d533514e335f028cfa6cdb26614ed0982484
GPU: refactor clipped drawing from DRW into GPU

Needed to fix T61196, supporting clipped back-buffer in the 3D view
which is done outside the draw module.

It was also inconvenient having DRW_shader_* versions of GPU_shader_*
API calls.

- Clipping distances are now supported as a shader configuration
  for builtin shaders.
- Add shader config argument when accessing builtin shaders.
- Move GPU_shader_create_from_arrays() from DRW to GPU.
22 files changed:
source/blender/draw/CMakeLists.txt
source/blender/draw/engines/basic/basic_engine.c
source/blender/draw/engines/external/external_engine.c
source/blender/draw/engines/workbench/workbench_deferred.c
source/blender/draw/engines/workbench/workbench_forward.c
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_builtin_shader.c [deleted file]
source/blender/draw/intern/draw_builtin_shader.h [deleted file]
source/blender/draw/intern/draw_common.c
source/blender/draw/intern/draw_common.h
source/blender/draw/intern/draw_manager.c
source/blender/draw/intern/draw_manager_shader.c
source/blender/draw/modes/edit_lattice_mode.c
source/blender/draw/modes/edit_mesh_mode.c
source/blender/draw/modes/object_mode.c
source/blender/draw/modes/overlay_mode.c
source/blender/draw/modes/paint_vertex_mode.c
source/blender/draw/modes/paint_weight_mode.c
source/blender/gpu/CMakeLists.txt
source/blender/gpu/GPU_shader.h
source/blender/gpu/intern/gpu_shader.c
source/blender/gpu/shaders/gpu_shader_cfg_world_clip_lib.glsl [moved from source/blender/draw/modes/shaders/common_world_clip_lib.glsl with 100% similarity]