mesa: Expose GLSL interpolation qualifiers in gl_fragment_program.
[mesa.git] / src / mesa / main / context.h
index 4e391dde4946a3d106d28131f0ec198318a5a8ae..a9df0a866a7f0cb1fe0cb33346fb88acdb670f36 100644 (file)
  * There are three large Mesa data types/classes which are meant to be
  * used by device drivers:
  * - struct gl_context: this contains the Mesa rendering state
- * - struct gl_config:  this describes the color buffer (RGB vs. ci), whether or not
- *   there's a depth buffer, stencil buffer, etc.
- * - struct gl_framebuffer:  contains pointers to the depth buffer, stencil buffer,
- *   accum buffer and alpha buffers.
+ * - struct gl_config:  this describes the color buffer (RGB vs. ci), whether
+ *   or not there's a depth buffer, stencil buffer, etc.
+ * - struct gl_framebuffer:  contains pointers to the depth buffer, stencil
+ *   buffer, accum buffer and alpha buffers.
  *
  * These types should be encapsulated by corresponding device driver
  * data types.  See xmesa.h and xmesaP.h for an example.
  *
- * In OOP terms, struct gl_context, struct gl_config, and struct gl_framebuffer are base classes
- * which the device driver must derive from.
+ * In OOP terms, struct gl_context, struct gl_config, and struct gl_framebuffer
+ * are base classes which the device driver must derive from.
  *
  * The following functions create and destroy these data types.
  */
@@ -233,7 +233,7 @@ do {                                                                \
  * glBegin()/glEnd() pair, with return value.
  * 
  * \param ctx GL context.
- * \param retval value to return value in case the assertion fails.
+ * \param retval value to return in case the assertion fails.
  */
 #define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval)              \
 do {                                                                   \
@@ -274,7 +274,7 @@ do {                                                                        \
  * glBegin()/glEnd() pair and flush the vertices, with return value.
  * 
  * \param ctx GL context.
- * \param retval value to return value in case the assertion fails.
+ * \param retval value to return in case the assertion fails.
  */
 #define ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, retval)    \
 do {                                                                   \
@@ -286,28 +286,4 @@ do {                                                                       \
 
 
 
-/**
- * Is the secondary color needed?
- */
-#define NEED_SECONDARY_COLOR(CTX)                                      \
-   (((CTX)->Light.Enabled &&                                           \
-     (CTX)->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)    \
-    || (CTX)->Fog.ColorSumEnabled                                      \
-    || ((CTX)->VertexProgram._Current &&                               \
-        ((CTX)->VertexProgram._Current != (CTX)->VertexProgram._TnlProgram) &&    \
-        ((CTX)->VertexProgram._Current->Base.InputsRead & VERT_BIT_COLOR1)) \
-    || ((CTX)->FragmentProgram._Current &&                             \
-        ((CTX)->FragmentProgram._Current != (CTX)->FragmentProgram._TexEnvProgram) &&  \
-        ((CTX)->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL1)) \
-   )
-
-
-/**
- * Is RGBA LogicOp enabled?
- */
-#define RGBA_LOGICOP_ENABLED(CTX) \
-  ((CTX)->Color.ColorLogicOpEnabled || \
-   ((CTX)->Color.BlendEnabled && (CTX)->Color.Blend[0].EquationRGB == GL_LOGIC_OP))
-
-
 #endif /* CONTEXT_H */