diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index be65be8214..78b2179627 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -361,4 +361,30 @@ do { \ /*@}*/ + +/** + * Macros to help evaluate current state conditions + */ + +/*@{*/ + +/** + * Is the secondary color needed? + */ +#define NEED_SECONDARY_COLOR(CTX) \ + (((CTX)->Light.Enabled && \ + (CTX)->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) \ + || (CTX)->Fog.ColorSumEnabled) + + +/** + * Is two-sided lighting in effect? + */ +#define NEED_TWO_SIDED_LIGHTING(CTX) \ + (ctx->Light.Enabled && ctx->Light.Model.TwoSide) + + +/*@}*/ + + #endif |