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:
authorJeroen Bakker <jeroen@blender.org>2021-02-08 17:42:59 +0300
committerJeroen Bakker <jeroen@blender.org>2021-02-09 10:12:29 +0300
commit549d9f87276a20036372317b1f988c4d0ef8c40c (patch)
tree92c587721c68cec7a1ae3ca5bfb6b87d8ac8e51a /source/blender/makesdna/DNA_image_types.h
parenteab9165c2512581b918d8bfca40ec98ded08a84a (diff)
Fix T81206: Do not limit gl texture size in image editor
This patch will show textures in the image editor with the maximum available resolution determined by the GPU Hardware/Driver. Currently the size is limited by the user preference texture size limit. An image user can set the `IMA_SHOW_MAX_RESOLUTION` flag to request gpu textures in the max supported resolution. When this flag isn't set the gpu texture is limited by the user preference setting. When the gl resolution limit is disabled the GPU texture is always created for the max supported resolution. Reviewed By: Clément Foucault Maniphest Tasks: T81206 Differential Revision: https://developer.blender.org/D9160
Diffstat (limited to 'source/blender/makesdna/DNA_image_types.h')
-rw-r--r--source/blender/makesdna/DNA_image_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index b1d752d6197..22408687daf 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -119,6 +119,10 @@ typedef struct ImageTile {
/* #define IMA_UNUSED_2 (1 << 2) */
#define IMA_NEED_FRAME_RECALC (1 << 3)
#define IMA_SHOW_STEREO (1 << 4)
+/* Do not limit the resolution by the limit texture size option in the user preferences.
+ * Images in the image editor or used as a backdrop are always shown using the maximum
+ * possible resolution. */
+#define IMA_SHOW_MAX_RESOLUTION (1 << 5)
/* Used to get the correct gpu texture from an Image datablock. */
typedef enum eGPUTextureTarget {
@@ -229,6 +233,8 @@ enum {
IMA_GPU_PARTIAL_REFRESH = (1 << 1),
/** All mipmap levels in OpenGL texture set? */
IMA_GPU_MIPMAP_COMPLETE = (1 << 2),
+ /** Current texture resolution won't be limited by the GL Texture Limit user preference. */
+ IMA_GPU_MAX_RESOLUTION = (1 << 3),
};
/* Image.source, where the image comes from */