Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 5dbbf35796f..899c7728af9 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -389,6 +389,7 @@ static void wm_draw_triple_free(wmWindow *win)
wmDrawTriple *triple= win->drawdata;
glDeleteTextures(triple->nx*triple->ny, triple->bind);
+
MEM_freeN(triple);
win->drawdata= NULL;
@@ -560,7 +561,8 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win)
else {
win->drawdata= MEM_callocN(sizeof(wmDrawTriple), "wmDrawTriple");
- if(!wm_triple_gen_textures(win, win->drawdata)) {
+ if(!wm_triple_gen_textures(win, win->drawdata))
+ {
wm_draw_triple_fail(C, win);
return;
}
@@ -675,13 +677,24 @@ static int wm_draw_update_test_window(wmWindow *win)
static int wm_automatic_draw_method(wmWindow *win)
{
+ /* Ideally all cards would work well with triple buffer, since if it works
+ well gives the least redraws and is considerably faster at partial redraw
+ for sculpting or drawing overlapping menus. For typically lower end cards
+ copy to texture is slow though and so we use overlap instead there. */
+
if(win->drawmethod == USER_DRAW_AUTOMATIC) {
/* ATI opensource driver is known to be very slow at this */
if(GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE))
return USER_DRAW_OVERLAP;
+#if 0
+ /* also Intel drivers don't work well with this */
+ else if(GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_ANY))
+ return USER_DRAW_OVERLAP;
+#endif
/* Windows software driver darkens color on each redraw */
else if(GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE))
return USER_DRAW_OVERLAP_FLIP;
+ /* drawing lower color depth again degrades colors each time */
else if(GPU_color_depth() < 24)
return USER_DRAW_OVERLAP;
else