Draw manager: Pass explicit context to DEG scene update callback

This way it is more clear what is needed to be passed and what is available
in the callback itself.

Thanks Dalai for review and tips about engine type!
This commit is contained in:
2017-11-28 16:42:58 +01:00
parent e183372f90
commit 701ebb0a64
3 changed files with 36 additions and 24 deletions

View File

@@ -30,6 +30,7 @@ struct ARegion;
struct CollectionEngineSettings;
struct Depsgraph;
struct DRWPass;
struct Main;
struct Material;
struct Scene;
struct DrawEngineType;
@@ -68,7 +69,15 @@ void DRW_engine_viewport_data_size_get(
const void *engine_type,
int *r_fbl_len, int *r_txl_len, int *r_psl_len, int *r_stl_len);
void DRW_notify_view_update(const struct bContext *C);
typedef struct DRWUpdateContext {
struct Main *bmain;
struct Scene *scene;
struct ViewLayer *view_layer;
struct ARegion *ar;
struct View3D *v3d;
struct RenderEngineType *engine_type;
} DRWUpdateContext;
void DRW_notify_view_update(const DRWUpdateContext *update_ctx);
void DRW_draw_view(const struct bContext *C);