Page MenuHome

[WIP] DesignTask: Add Drawing Of Image/UV Editor to the Draw Manager
Open, NormalPublic

Description

Investigate how we can add drawing of other views into the draw manager. The technical cases we have are:

  • UV Editor already uses the draw_cache of the draw manager for the stretching overlay.
  • Future Migration to other GLs.
  • Support for GPU selection.
  • Image/UV editor also has overlays.
  • Realtime Baking with unwrapping

This design will go over the how and impact of such a change.

  • The draw manager should be able to create a drawing and select loop based on the Context SpaceLink.
  • Current Draw loop is specific 3d. actually only v3d and ar3d are 3d specific parameters. The idea is to have a specific 2d drawing loop DRW_draw_render_loop_2d_ex in the draw manager that is more generic. The entry point will still be DRW_draw_view.

Matrices

The draw manager uses multiple matrices for specific part of the geometry transform. Most of the view2d drawing isn't using any matrices. There is one matrix that is generated from UI_view2d_view_to_region_m4 used by the gizmo code. One of the requests we have is to be able to rotate the image. This can be handled by the viewmat.

Details

Differential Revisions
D6093: [WIP] DrawManager: Image/UV editor Drawing
Type
To Do