Refactor: Introduce ViewRender for viewport renders #110244

Merged
Sergey Sharybin merged 8 commits from Sergey/blender:view_render into main 2023-07-19 12:12:18 +02:00

8 Commits

Author SHA1 Message Date
Sergey Sharybin 538bdd1280 Refactor: Make viewport to use ViewRender
buildbot/vexp-code-patch-coordinator Build done. Details
This change replaces a bare RenderEngine owned by a viewport
with a VeiwRender. This unlocks a possibility of accessing
RenderResult for viewport renders. Currently it is not done,
but it will be needed for an upcoming work towards unification
of the render passes handling.

Ref #108618
2023-07-18 17:17:48 +02:00
Sergey Sharybin 3c281d8654 Refactor: Allow Render to manage lifetime of resources 2023-07-18 15:50:45 +02:00
Sergey Sharybin 1d8f104862 Refactor: Move re-usable parts of Render to a base class
Currently no functional changes.

Preparing for introduction of a Render structure for the viewport
render which will hold both engine and the render result for
passes access.
2023-07-18 15:41:06 +02:00
Sergey Sharybin 54431d1844 Refactor: Make Render a real C++ structure
Use proper allocation and destruction for it.

Since the allocation is no longer zero-initialized make sure the
fields are explicitly zeroed out. This also allows to use an easier
way to initialize mutexes.

Currently no functional changes, preparing for a bigger refactor.
2023-07-18 15:41:06 +02:00
Sergey Sharybin 87df9efd67 Refactor: Use C++ list internally in render pipeline
Used for the global list of the Render structures.

Using C++ container helps moving towards reliable "real" C++
structure for the Render, without worrying about the offset of
the next/prev fields.

Should be no functional changes on the user side.
2023-07-18 15:33:28 +02:00
Sergey Sharybin 27fb75e91c Cleanup: Remove unused field from Render 2023-07-18 14:22:32 +02:00
Sergey Sharybin fcd3ccf9f9 Cleanup: Use C++ style struct definition 2023-07-18 14:22:32 +02:00
Sergey Sharybin 2542edfe85 Cleanup: Better comments in the RE_engine_draw_acquire() 2023-07-18 14:22:32 +02:00