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>2020-03-06 14:08:03 +0300
committerJeroen Bakker <jeroen@blender.org>2020-03-06 14:11:55 +0300
commit297261eb906c56c7decf4401e6a3e06cec1691e8 (patch)
treef9833fb55af46edc0bc3849cffeb2dee83a3c6c9 /source/blender/imbuf/IMB_imbuf_types.h
parent9fa29fe7652a9adc4a11ba3dc2975595489f7bcd (diff)
CodeCleanup: Added enums to opengl render functions
Motivation the functions get 3 different kind of flag parameters (ImBuf, DrawType, OffscreenRendering) the naming of the flags were not clear, leading to mistakes and unnecessary time spend debugging.
Diffstat (limited to 'source/blender/imbuf/IMB_imbuf_types.h')
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h65
1 files changed, 32 insertions, 33 deletions
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index 3559a7ca387..4a5f8cc1bfe 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -141,6 +141,38 @@ typedef struct ImbFormatOptions {
char quality;
} ImbFormatOptions;
+/**
+ * \name Imbuf Component flags
+ * \brief These flags determine the components of an ImBuf struct.
+ *
+ * \{ */
+
+typedef enum eImBufFlags {
+ IB_rect = 1 << 0,
+ IB_test = 1 << 1,
+ IB_zbuf = 1 << 3,
+ IB_mem = 1 << 4,
+ IB_rectfloat = 1 << 5,
+ IB_zbuffloat = 1 << 6,
+ IB_multilayer = 1 << 7,
+ IB_metadata = 1 << 8,
+ IB_animdeinterlace = 1 << 9,
+ IB_tiles = 1 << 10,
+ IB_tilecache = 1 << 11,
+ /** indicates whether image on disk have premul alpha */
+ IB_alphamode_premul = 1 << 12,
+ /** if this flag is set, alpha mode would be guessed from file */
+ IB_alphamode_detect = 1 << 13,
+ /* alpha channel is unrelated to RGB and should not affect it */
+ IB_alphamode_channel_packed = 1 << 14,
+ /** ignore alpha on load and substitute it with 1.0f */
+ IB_alphamode_ignore = 1 << 15,
+ IB_thumbnail = 1 << 16,
+ IB_multiview = 1 << 17,
+ IB_halffloat = 1 << 18,
+} eImBufFlags;
+
+/** \} */
typedef struct ImBuf {
struct ImBuf *next, *prev; /**< allow lists of ImBufs, for caches or flipbooks */
@@ -268,39 +300,6 @@ enum {
};
/**
- * \name Imbuf Component flags
- * \brief These flags determine the components of an ImBuf struct.
- *
- * \{ */
-
-enum {
- IB_rect = 1 << 0,
- IB_test = 1 << 1,
- IB_zbuf = 1 << 3,
- IB_mem = 1 << 4,
- IB_rectfloat = 1 << 5,
- IB_zbuffloat = 1 << 6,
- IB_multilayer = 1 << 7,
- IB_metadata = 1 << 8,
- IB_animdeinterlace = 1 << 9,
- IB_tiles = 1 << 10,
- IB_tilecache = 1 << 11,
- /** indicates whether image on disk have premul alpha */
- IB_alphamode_premul = 1 << 12,
- /** if this flag is set, alpha mode would be guessed from file */
- IB_alphamode_detect = 1 << 13,
- /* alpha channel is unrelated to RGB and should not affect it */
- IB_alphamode_channel_packed = 1 << 14,
- /** ignore alpha on load and substitute it with 1.0f */
- IB_alphamode_ignore = 1 << 15,
- IB_thumbnail = 1 << 16,
- IB_multiview = 1 << 17,
- IB_halffloat = 1 << 18,
-};
-
-/** \} */
-
-/**
* \name Imbuf preset profile tags
* \brief Some predefined color space profiles that 8 bit imbufs can represent
*