Move away from using the ctx->_TriangleCaps bitfield.
New macros in context.h for testing state: NEED_SECONDARY_COLOR and NEED_TWO_SIDED_LIGHTING.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user