Merge remote-tracking branch 'origin/master' into blender2.8

I'm deliberately ignoring/reverting rB070f22c4 which in turns means T49861 is happening on 2.8
This commit is contained in:
Dalai Felinto
2017-01-02 11:34:05 +01:00
3 changed files with 9 additions and 8 deletions

View File

@@ -426,7 +426,8 @@ static bool wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple)
return true;
}
void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha)
/* TODO: fix interface - T49861 */
void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha, bool UNUSED(is_interlace))
{
const int sizex = WM_window_pixels_x(win);
const int sizey = WM_window_pixels_y(win);
@@ -507,7 +508,7 @@ static void wm_draw_region_blend(wmWindow *win, ARegion *ar, wmDrawTriple *tripl
wmSubWindowScissorSet(win, win->screen->mainwin, &ar->winrct, true);
glEnable(GL_BLEND);
wm_triple_draw_textures(win, triple, 1.0f - fac);
wm_triple_draw_textures(win, triple, 1.0f - fac, false);
glDisable(GL_BLEND);
}
}
@@ -529,7 +530,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win)
wmSubWindowSet(win, screen->mainwin);
wm_triple_draw_textures(win, drawdata->triple, 1.0f);
wm_triple_draw_textures(win, drawdata->triple, 1.0f, false);
}
else {
/* we run it when we start OR when we turn stereo on */
@@ -670,7 +671,7 @@ static void wm_method_draw_triple_multiview(bContext *C, wmWindow *win, StereoVi
wmSubWindowSet(win, screen->mainwin);
wm_triple_draw_textures(win, drawdata->triple, 1.0f);
wm_triple_draw_textures(win, drawdata->triple, 1.0f, false);
}
}
else {

View File

@@ -78,7 +78,7 @@ static void wm_method_draw_stereo3d_pageflip(wmWindow *win)
else //STEREO_RIGHT_ID
glDrawBuffer(GL_BACK_RIGHT);
wm_triple_draw_textures(win, drawdata->triple, 1.0f);
wm_triple_draw_textures(win, drawdata->triple, 1.0f, false);
}
glDrawBuffer(GL_BACK);
@@ -121,7 +121,7 @@ static void wm_method_draw_stereo3d_interlace(wmWindow *win)
break;
}
wm_triple_draw_textures(win, drawdata->triple, 1.0f);
wm_triple_draw_textures(win, drawdata->triple, 1.0f, true);
GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
}
interlace_prev_type = interlace_type;
@@ -158,7 +158,7 @@ static void wm_method_draw_stereo3d_anaglyph(wmWindow *win)
break;
}
wm_triple_draw_textures(win, drawdata->triple, 1.0f);
wm_triple_draw_textures(win, drawdata->triple, 1.0f, false);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
}

View File

@@ -56,7 +56,7 @@ void wm_draw_region_clear (struct wmWindow *win, struct ARegion *ar);
void wm_tag_redraw_overlay (struct wmWindow *win, struct ARegion *ar);
void wm_triple_draw_textures (struct wmWindow *win, struct wmDrawTriple *triple, float alpha);
void wm_triple_draw_textures (struct wmWindow *win, struct wmDrawTriple *triple, float alpha, bool is_interlace);
void wm_draw_data_free (struct wmWindow *win);