2016-11-16 17:01:19 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2016, Blender Foundation.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Institute
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-02-07 11:20:15 +01:00
|
|
|
/** \file DRW_engine.h
|
|
|
|
* \ingroup draw
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DRW_ENGINE_H__
|
|
|
|
#define __DRW_ENGINE_H__
|
|
|
|
|
2017-04-25 20:39:25 +02:00
|
|
|
struct ARegion;
|
2017-02-17 17:53:51 +01:00
|
|
|
struct CollectionEngineSettings;
|
2017-04-26 10:46:55 +02:00
|
|
|
struct Depsgraph;
|
2017-02-07 11:20:15 +01:00
|
|
|
struct DRWPass;
|
|
|
|
struct Material;
|
|
|
|
struct Scene;
|
2017-03-08 20:00:09 +01:00
|
|
|
struct DrawEngineType;
|
2017-03-30 17:01:23 +02:00
|
|
|
struct IDProperty;
|
2017-03-08 20:00:09 +01:00
|
|
|
struct bContext;
|
|
|
|
struct Object;
|
2017-11-22 13:52:39 +01:00
|
|
|
struct ViewLayer;
|
2017-04-25 20:39:25 +02:00
|
|
|
struct ViewContext;
|
2017-04-27 20:33:58 +02:00
|
|
|
struct ViewportEngineData;
|
2017-04-25 20:39:25 +02:00
|
|
|
struct View3D;
|
|
|
|
struct rcti;
|
2017-05-02 18:50:29 +02:00
|
|
|
struct GPUOffScreen;
|
2017-10-16 21:15:03 +02:00
|
|
|
struct RenderEngineType;
|
|
|
|
struct WorkSpace;
|
2017-04-25 20:39:25 +02:00
|
|
|
|
|
|
|
#include "BLI_sys_types.h" /* for bool */
|
2017-02-07 11:20:15 +01:00
|
|
|
|
2017-03-08 20:00:09 +01:00
|
|
|
/* Buffer and textures used by the viewport by default */
|
|
|
|
typedef struct DefaultFramebufferList {
|
|
|
|
struct GPUFrameBuffer *default_fb;
|
2017-09-23 20:47:42 +02:00
|
|
|
struct GPUFrameBuffer *multisample_fb;
|
2017-03-08 20:00:09 +01:00
|
|
|
} DefaultFramebufferList;
|
|
|
|
|
|
|
|
typedef struct DefaultTextureList {
|
|
|
|
struct GPUTexture *color;
|
|
|
|
struct GPUTexture *depth;
|
2017-09-23 20:47:42 +02:00
|
|
|
struct GPUTexture *multisample_color;
|
|
|
|
struct GPUTexture *multisample_depth;
|
2017-03-08 20:00:09 +01:00
|
|
|
} DefaultTextureList;
|
|
|
|
|
|
|
|
void DRW_engines_register(void);
|
2017-02-07 11:20:15 +01:00
|
|
|
void DRW_engines_free(void);
|
|
|
|
|
2017-03-08 20:00:09 +01:00
|
|
|
void DRW_engine_register(struct DrawEngineType *draw_engine_type);
|
2017-04-12 11:49:19 +02:00
|
|
|
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);
|
2017-03-08 20:00:09 +01:00
|
|
|
|
2017-09-25 20:07:02 +02:00
|
|
|
void DRW_notify_view_update(const struct bContext *C);
|
|
|
|
|
2017-03-08 20:00:09 +01:00
|
|
|
void DRW_draw_view(const struct bContext *C);
|
2017-05-02 16:45:10 +02:00
|
|
|
|
2017-06-06 16:19:07 +02:00
|
|
|
void DRW_draw_render_loop_ex(
|
|
|
|
struct Depsgraph *graph,
|
2017-10-16 21:15:03 +02:00
|
|
|
struct RenderEngineType *engine,
|
2017-06-06 16:19:07 +02:00
|
|
|
struct ARegion *ar, struct View3D *v3d,
|
|
|
|
const struct bContext *evil_C);
|
2017-05-02 16:45:10 +02:00
|
|
|
void DRW_draw_render_loop(
|
|
|
|
struct Depsgraph *graph,
|
2017-05-02 19:06:37 +02:00
|
|
|
struct ARegion *ar, struct View3D *v3d);
|
2017-05-02 18:50:29 +02:00
|
|
|
void DRW_draw_render_loop_offscreen(
|
|
|
|
struct Depsgraph *graph,
|
2017-10-16 21:15:03 +02:00
|
|
|
struct RenderEngineType *engine,
|
2017-05-02 19:06:37 +02:00
|
|
|
struct ARegion *ar, struct View3D *v3d,
|
2017-05-02 18:50:29 +02:00
|
|
|
struct GPUOffScreen *ofs);
|
2017-04-25 20:39:25 +02:00
|
|
|
void DRW_draw_select_loop(
|
2017-05-02 16:05:57 +02:00
|
|
|
struct Depsgraph *graph,
|
2017-05-02 19:06:37 +02:00
|
|
|
struct ARegion *ar, struct View3D *v3d,
|
2017-04-25 20:39:25 +02:00
|
|
|
bool use_obedit_skip, bool use_nearest, const struct rcti *rect);
|
2017-04-26 17:43:05 +02:00
|
|
|
void DRW_draw_depth_loop(
|
2017-04-26 18:36:56 +02:00
|
|
|
struct Depsgraph *graph,
|
2017-05-02 16:05:57 +02:00
|
|
|
struct ARegion *ar, struct View3D *v3d);
|
2017-03-08 20:00:09 +01:00
|
|
|
|
2017-02-07 11:20:15 +01:00
|
|
|
/* This is here because GPUViewport needs it */
|
|
|
|
void DRW_pass_free(struct DRWPass *pass);
|
|
|
|
|
2017-02-17 17:53:51 +01:00
|
|
|
/* Mode engines initialization */
|
2017-03-30 17:01:23 +02:00
|
|
|
void OBJECT_collection_settings_create(struct IDProperty *properties);
|
|
|
|
void EDIT_MESH_collection_settings_create(struct IDProperty *properties);
|
|
|
|
void EDIT_ARMATURE_collection_settings_create(struct IDProperty *properties);
|
2017-05-03 18:55:40 +02:00
|
|
|
void PAINT_WEIGHT_collection_settings_create(struct IDProperty *properties);
|
2017-05-04 19:59:27 +02:00
|
|
|
void PAINT_VERTEX_collection_settings_create(struct IDProperty *properties);
|
2017-02-17 17:53:51 +01:00
|
|
|
|
|
|
|
#endif /* __DRW_ENGINE_H__ */
|