diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-03-06 14:08:03 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-03-06 14:11:55 +0300 |
commit | 297261eb906c56c7decf4401e6a3e06cec1691e8 (patch) | |
tree | f9833fb55af46edc0bc3849cffeb2dee83a3c6c9 /source/blender/editors/space_view3d/view3d_draw.c | |
parent | 9fa29fe7652a9adc4a11ba3dc2975595489f7bcd (diff) |
CodeCleanup: Added enums to opengl render functions
Motivation the functions get 3 different kind of flag parameters (ImBuf,
DrawType, OffscreenRendering) the naming of the flags were not clear,
leading to mistakes and unnecessary time spend debugging.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 4ff8a9a3884..c58c4b33f05 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -67,6 +67,7 @@ #include "ED_screen.h" #include "ED_screen_types.h" #include "ED_transform.h" +#include "ED_view3d_offscreen.h" #include "DEG_depsgraph_query.h" @@ -1630,7 +1631,7 @@ static void view3d_stereo3d_setup_offscreen(Depsgraph *depsgraph, void ED_view3d_draw_offscreen(Depsgraph *depsgraph, Scene *scene, - int drawtype, + eObjectDrawType drawtype, View3D *v3d, ARegion *ar, int winx, @@ -1710,12 +1711,12 @@ void ED_view3d_draw_offscreen(Depsgraph *depsgraph, */ ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph, Scene *scene, - int drawtype, + eObjectDrawType drawtype, View3D *v3d, ARegion *ar, int sizex, int sizey, - uint flag, + eImBufFlags imbuf_flag, int alpha_mode, const char *viewname, /* output vars */ @@ -1755,7 +1756,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph, GPU_offscreen_bind(ofs, true); /* read in pixels & stamp */ - ImBuf *ibuf = IMB_allocImBuf(sizex, sizey, 32, flag); + ImBuf *ibuf = IMB_allocImBuf(sizex, sizey, 32, imbuf_flag); /* render 3d view */ if (rv3d->persp == RV3D_CAMOB && v3d->camera) { @@ -1856,12 +1857,12 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph, ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph, Scene *scene, View3DShading *shading_override, - int drawtype, + eObjectDrawType drawtype, Object *camera, int width, int height, - uint flag, - uint draw_flags, + eImBufFlags imbuf_flag, + eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, GPUOffScreen *ofs, @@ -1934,7 +1935,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph, &ar, width, height, - flag, + imbuf_flag, alpha_mode, viewname, ofs, |