diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-01 02:45:51 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-01 02:45:51 +0300 |
commit | 87bbb2d827064a4fd59ffc77cc2dcbc31f02ce4f (patch) | |
tree | 5d9ddb0e6859850825de07d18475797957d1a969 /source/blender/windowmanager/intern/wm_draw.c | |
parent | 873f2c71252da872f3fd1d9aa2140e3067ba6890 (diff) |
WM Draw Methods now has a new option Automatic (default). This will
set the draw method to triple buffer or overlap depending on the
configuration. Ideally I could get all cases working well with triple
buffer but it's hard in practice. At the moment there are two cases
that use overlap instead:
* opensource ATI drives on linux
* windows software renderer
Also added a utility function to check GPU device/os/driver.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 0d2f1043d0b..0bbd3757f27 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -689,6 +689,15 @@ void wm_draw_update(bContext *C) if(win->drawfail) wm_method_draw_overlap_all(C, win); + else if(win->drawmethod == USER_DRAW_AUTOMATIC) { + /* ATI opensource driver is known to be very slow at this, + Windows software driver darkens color on each redraw */ + if(GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE) || + GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE)) + wm_method_draw_overlap_all(C, win); + else + wm_method_draw_triple(C, win); + } else if(win->drawmethod == USER_DRAW_FULL) wm_method_draw_full(C, win); else if(win->drawmethod == USER_DRAW_OVERLAP) |