Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/DRW_render.h
| Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
| typedef struct BoundSphere { | typedef struct BoundSphere { | ||||
| float center[3], radius; | float center[3], radius; | ||||
| } BoundSphere; | } BoundSphere; | ||||
| /* declare members as empty (unused) */ | /* declare members as empty (unused) */ | ||||
| typedef char DRWViewportEmptyList; | typedef char DRWViewportEmptyList; | ||||
| #define DRW_VIEWPORT_LIST_SIZE(list) \ | #define DRW_VIEWPORT_LIST_SIZE(list) \ | ||||
| (sizeof(list) == sizeof(DRWViewportEmptyList) ? 0 : ((sizeof(list)) / sizeof(void *))) | (sizeof(list) == sizeof(DRWViewportEmptyList) ? 0 : (sizeof(list) / sizeof(void *))) | ||||
| /* Unused members must be either pass list or 'char *' when not used. */ | /* Unused members must be either pass list or 'char *' when not used. */ | ||||
| #define DRW_VIEWPORT_DATA_SIZE(ty) \ | #define DRW_VIEWPORT_DATA_SIZE(ty) \ | ||||
| { \ | { \ | ||||
| DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->fbl)), DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->txl)), \ | DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->fbl)), DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->txl)), \ | ||||
| DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->psl)), \ | DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->psl)), \ | ||||
| DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->stl)), \ | DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->stl)), \ | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | typedef enum { | ||||
| DRW_STATE_DEPTH_LESS = (2 << 4), | DRW_STATE_DEPTH_LESS = (2 << 4), | ||||
| DRW_STATE_DEPTH_LESS_EQUAL = (3 << 4), | DRW_STATE_DEPTH_LESS_EQUAL = (3 << 4), | ||||
| DRW_STATE_DEPTH_EQUAL = (4 << 4), | DRW_STATE_DEPTH_EQUAL = (4 << 4), | ||||
| DRW_STATE_DEPTH_GREATER = (5 << 4), | DRW_STATE_DEPTH_GREATER = (5 << 4), | ||||
| DRW_STATE_DEPTH_GREATER_EQUAL = (6 << 4), | DRW_STATE_DEPTH_GREATER_EQUAL = (6 << 4), | ||||
| /** Culling test */ | /** Culling test */ | ||||
| DRW_STATE_CULL_BACK = (1 << 7), | DRW_STATE_CULL_BACK = (1 << 7), | ||||
| DRW_STATE_CULL_FRONT = (1 << 8), | DRW_STATE_CULL_FRONT = (1 << 8), | ||||
| /** Stencil test . These options are mutually exclusive and packed into 2 bits. */ | /** Stencil test. These options are mutually exclusive and packed into 2 bits. */ | ||||
| DRW_STATE_STENCIL_ALWAYS = (1 << 9), | DRW_STATE_STENCIL_ALWAYS = (1 << 9), | ||||
| DRW_STATE_STENCIL_EQUAL = (2 << 9), | DRW_STATE_STENCIL_EQUAL = (2 << 9), | ||||
| DRW_STATE_STENCIL_NEQUAL = (3 << 9), | DRW_STATE_STENCIL_NEQUAL = (3 << 9), | ||||
| /** Blend state. These options are mutual exclusive and packed into 4 bits */ | /** Blend state. These options are mutual exclusive and packed into 4 bits */ | ||||
| DRW_STATE_BLEND_ADD = (1 << 11), | DRW_STATE_BLEND_ADD = (1 << 11), | ||||
| /** Same as additive but let alpha accumulate without pre-multiply. */ | /** Same as additive but let alpha accumulate without pre-multiply. */ | ||||
| DRW_STATE_BLEND_ADD_FULL = (2 << 11), | DRW_STATE_BLEND_ADD_FULL = (2 << 11), | ||||
| ▲ Show 20 Lines • Show All 442 Lines • Show Last 20 Lines | |||||