diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-03-08 22:00:09 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-03-09 03:30:26 +0300 |
commit | 3b91989a093aef874b601efcffd247cf61e73bad (patch) | |
tree | f5e8df6b3aad70c71e8002c0e3775b768dbd22fc /source/blender/gpu/GPU_viewport.h | |
parent | d9f42e5fab6a13ce200665b9a89291aa34ff6c09 (diff) |
Draw Manager: structural change
All engines are now called by the draw manager. Engines are separate entities that cannot interfer with each others.
Also separated draw_mode_pass.c into the mode engines.
Diffstat (limited to 'source/blender/gpu/GPU_viewport.h')
-rw-r--r-- | source/blender/gpu/GPU_viewport.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/gpu/GPU_viewport.h b/source/blender/gpu/GPU_viewport.h index f0e991fdac2..64f003badb7 100644 --- a/source/blender/gpu/GPU_viewport.h +++ b/source/blender/gpu/GPU_viewport.h @@ -63,28 +63,27 @@ typedef struct StorageList { void *storage[MAX_STORAGE]; /* custom structs from the engine */ } StorageList; -/* Buffer and textures used by the viewport by default */ -typedef struct DefaultFramebufferList { - struct GPUFrameBuffer *default_fb; -} DefaultFramebufferList; +typedef struct ViewportEngineData { + char engine_name[32]; -typedef struct DefaultTextureList { - struct GPUTexture *color; - struct GPUTexture *depth; -} DefaultTextureList; - -typedef struct DefaultPassList { - struct DRWPass *non_meshes_pass; - struct DRWPass *ob_center_pass; -} DefaultPassList; + FramebufferList *fbl; + TextureList *txl; + PassList *psl; + StorageList *stl; +} ViewportEngineData; GPUViewport *GPU_viewport_create(void); -void GPU_viewport_bind(GPUViewport *viewport, const rcti *rect, const char *engine, int mode); +void GPU_viewport_bind(GPUViewport *viewport, const rcti *rect); void GPU_viewport_unbind(GPUViewport *viewport); void GPU_viewport_free(GPUViewport *viewport); -void GPU_viewport_get_engine_data(GPUViewport *viewport, FramebufferList **fbs, TextureList **txs, PassList **pss, StorageList **str); -void GPU_viewport_get_mode_data(GPUViewport *viewport, FramebufferList **fbs, TextureList **txs, PassList **pss, StorageList **str); +void *GPU_viewport_engine_data_create(GPUViewport *viewport, const char *engine_name); +void *GPU_viewport_engine_data_get(GPUViewport *viewport, const char *engine_name); +void *GPU_viewport_framebuffer_list_get(GPUViewport *viewport); +void *GPU_viewport_texture_list_get(GPUViewport *viewport); +void GPU_viewport_size_get(GPUViewport *viewport, int *size); + +bool GPU_viewport_cache_validate(GPUViewport *viewport, int hash); /* debug */ bool GPU_viewport_debug_depth_create(GPUViewport *viewport, int width, int height, char err_out[256]); |