diff options
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, 5 insertions, 12 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index de373d54be6..b8fff234347 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1871,8 +1871,6 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) Scene *sce; Base *base; Object *ob; - ARegion ar; - RegionView3D rv3d; shadows.first= shadows.last= NULL; @@ -1901,6 +1899,8 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) /* this needs to be done better .. */ float viewmat[4][4], winmat[4][4]; int drawtype, lay, winsize, flag2=v3d->flag2; + ARegion ar= {0}; + RegionView3D rv3d= {{{0}}}; drawtype= v3d->drawtype; lay= v3d->lay; @@ -1912,9 +1912,6 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) GPU_lamp_shadow_buffer_bind(shadow->lamp, viewmat, &winsize, winmat); - memset(&ar, 0, sizeof(ar)); - memset(&rv3d, 0, sizeof(rv3d)); - ar.regiondata= &rv3d; ar.regiontype= RGN_TYPE_WINDOW; rv3d.persp= RV3D_CAMOB; @@ -2180,13 +2177,9 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in /* creates own 3d views, used by the sequencer */ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, int width, int height, unsigned int flag, int drawtype) { - View3D v3d; - ARegion ar; - RegionView3D rv3d; - - memset(&v3d, 0, sizeof(v3d)); - memset(&ar, 0, sizeof(ar)); - memset(&rv3d, 0, sizeof(rv3d)); + View3D v3d= {0}; + ARegion ar= {0}; + RegionView3D rv3d= {{{0}}}; /* connect data */ v3d.regionbase.first= v3d.regionbase.last= &ar; |