Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/IMB_imbuf_enums.h
- This file was added.
| /* | |||||
| * This program is free software; you can redistribute it and/or | |||||
| * modify it under the terms of the GNU General Public License | |||||
| * as published by the Free Software Foundation; either version 2 | |||||
| * of the License, or (at your option) any later version. | |||||
| * | |||||
| * This program is distributed in the hope that it will be useful, | |||||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
| * GNU General Public License for more details. | |||||
| * | |||||
| * You should have received a copy of the GNU General Public License | |||||
| * along with this program; if not, write to the Free Software Foundation, | |||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||||
| * | |||||
| * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. | |||||
| * All rights reserved. | |||||
| */ | |||||
| #ifndef __IMB_IMBUF_ENUMS_H__ | |||||
| #define __IMB_IMBUF_ENUMS_H__ | |||||
| #include "BLI_utildefines.h" | |||||
| #ifdef __cplusplus | |||||
brecht: Don't make this include conditional on C/C++. | |||||
| extern "C" { | |||||
| #endif | |||||
| /** | |||||
| * \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; | |||||
| BLI_ENUM_FLAG_OPERATORS(eImBufFlags) | |||||
| /* \} */ | |||||
Done Inline ActionsWindows has a macro (DEFINE_ENUM_FLAG_OPERATORS) that can generate these operators. Perhaps we should add a blenlib wrapper and implement it for other plaforms. jbakker: Windows has a macro (`DEFINE_ENUM_FLAG_OPERATORS`) that can generate these operators. Perhaps… | |||||
Done Inline ActionsSeems reasonable to add that to BLI. brecht: Seems reasonable to add that to BLI. | |||||
| #ifdef __cplusplus | |||||
| } | |||||
| #endif | |||||
| #endif /* __IMB_IMBUF_ENUMS_H__ */ | |||||
Don't make this include conditional on C/C++.