From 7cbb8f20a4b479380dac1d2a2f7c7f85ede408be Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 20 Apr 2019 12:47:06 +0200 Subject: GPU: automatically draw images with GLSL shader depending on resolution This adds a new "Automatic" image display method which uses GLSL shaders for most images. It only does CPU side color management for higher res images where sending big float buffers to the GPU is likely to be a bottleneck or cause memory usage problem. Automatic is the default now, previously it was 2D Texture. --- source/blender/blenloader/intern/versioning_userdef.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 65a19ca80c1..069b1907cce 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -491,6 +491,12 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef) userdef->move_threshold = 2; } + if (!USER_VERSION_ATLEAST(280, 58)) { + if (userdef->image_draw_method != IMAGE_DRAW_METHOD_GLSL) { + userdef->image_draw_method = IMAGE_DRAW_METHOD_AUTO; + } + } + /** * Include next version bump. */ @@ -505,9 +511,6 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef) if (userdef->pixelsize == 0.0f) userdef->pixelsize = 1.0f; - if (userdef->image_draw_method == 0) - userdef->image_draw_method = IMAGE_DRAW_METHOD_2DTEXTURE; - for (bTheme *btheme = userdef->themes.first; btheme; btheme = btheme->next) { do_versions_theme(userdef, btheme); } -- cgit v1.2.3