forked from bartvdbraak/blender
fix [#28401] OpenGL render option disables border clipping
This commit is contained in:
parent
80459d97c7
commit
3dc817840b
@ -2272,6 +2272,7 @@ static void view3d_main_area_setup_view(Scene *scene, View3D *v3d, ARegion *ar,
|
|||||||
|
|
||||||
void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx, int winy, float viewmat[][4], float winmat[][4])
|
void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx, int winy, float viewmat[][4], float winmat[][4])
|
||||||
{
|
{
|
||||||
|
RegionView3D *rv3d= ar->regiondata;
|
||||||
Base *base;
|
Base *base;
|
||||||
float backcol[3];
|
float backcol[3];
|
||||||
int bwinx, bwiny;
|
int bwinx, bwiny;
|
||||||
@ -2320,6 +2321,9 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
|
|||||||
/* setup view matrices */
|
/* setup view matrices */
|
||||||
view3d_main_area_setup_view(scene, v3d, ar, viewmat, winmat);
|
view3d_main_area_setup_view(scene, v3d, ar, viewmat, winmat);
|
||||||
|
|
||||||
|
if(rv3d->rflag & RV3D_CLIPPING)
|
||||||
|
view3d_draw_clipping(rv3d);
|
||||||
|
|
||||||
/* set zbuffer */
|
/* set zbuffer */
|
||||||
if(v3d->drawtype > OB_WIRE) {
|
if(v3d->drawtype > OB_WIRE) {
|
||||||
v3d->zbuf= TRUE;
|
v3d->zbuf= TRUE;
|
||||||
@ -2328,6 +2332,9 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
|
|||||||
else
|
else
|
||||||
v3d->zbuf= FALSE;
|
v3d->zbuf= FALSE;
|
||||||
|
|
||||||
|
if(rv3d->rflag & RV3D_CLIPPING)
|
||||||
|
view3d_set_clipping(rv3d);
|
||||||
|
|
||||||
/* draw set first */
|
/* draw set first */
|
||||||
if(scene->set) {
|
if(scene->set) {
|
||||||
Scene *sce_iter;
|
Scene *sce_iter;
|
||||||
@ -2363,6 +2370,9 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
|
|||||||
if(v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); // clears zbuffer if it is used!
|
if(v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); // clears zbuffer if it is used!
|
||||||
if(v3d->afterdraw_xraytransp.first) view3d_draw_xraytransp(scene, ar, v3d, 1);
|
if(v3d->afterdraw_xraytransp.first) view3d_draw_xraytransp(scene, ar, v3d, 1);
|
||||||
|
|
||||||
|
if(rv3d->rflag & RV3D_CLIPPING)
|
||||||
|
view3d_clr_clipping();
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
if(v3d->zbuf) {
|
if(v3d->zbuf) {
|
||||||
v3d->zbuf= FALSE;
|
v3d->zbuf= FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user