diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-03-23 02:10:40 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-03-25 03:03:10 +0300 |
commit | 81632de706188eb304686aa35d5d3ee0cc717eb3 (patch) | |
tree | 0a6b9fd40c7ec7add2e1d6f691a6a67b6e4786dc /source/blender/draw/DRW_engine.h | |
parent | f7cb19956fadfe97513ac6878060d85864e21537 (diff) |
DRW: Move mempool datas to a DRW managed struct.
Same idea as previous commit. This cleans-up the interface and put all
viewport related data inside the `DRWData` struct.
The draw manager is responsible for freeing it. That is the main point
of this all. In the future, we can have custom freeing method for each
engine.
This also move the DefaultFramebuffer/TextureList and the engine related
data to a new `DRWViewData` struct. This struct manages the per view
(as in stereo view) engine data.
There is a bit of cleanup in the way the draw manager is setup.
We now use a temporary DRWData instead of creating a dummy viewport.
Diffstat (limited to 'source/blender/draw/DRW_engine.h')
-rw-r--r-- | source/blender/draw/DRW_engine.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/DRW_engine.h b/source/blender/draw/DRW_engine.h index 2d5b93f4272..4b96b2814b0 100644 --- a/source/blender/draw/DRW_engine.h +++ b/source/blender/draw/DRW_engine.h @@ -26,13 +26,12 @@ #include "DNA_object_enums.h" -#include "DRW_engine_types.h" - #ifdef __cplusplus extern "C" { #endif struct ARegion; +struct DRWData; struct DRWInstanceDataList; struct Depsgraph; struct DrawEngineType; @@ -57,8 +56,6 @@ void DRW_engines_free(void); bool DRW_engine_render_support(struct DrawEngineType *draw_engine_type); void DRW_engine_register(struct DrawEngineType *draw_engine_type); -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); typedef struct DRWUpdateContext { struct Main *bmain; @@ -176,6 +173,9 @@ void DRW_deferred_shader_remove(struct GPUMaterial *mat); struct DrawDataList *DRW_drawdatalist_from_id(struct ID *id); void DRW_drawdata_free(struct ID *id); +struct DRWData *DRW_viewport_data_create(void); +void DRW_viewport_data_free(struct DRWData *drw_data); + #ifdef __cplusplus } #endif |