mesa: rename some gl_light fields to be clearer
[mesa.git] / src / mesa / main / mtypes.h
index f2058641911db679286ffee180dfd7fd6df63f5f..3f3159000004e1c972f3e51b077caa2d84a9b02e 100644 (file)
@@ -460,7 +460,7 @@ struct gl_light
    GLfloat Diffuse[4];         /**< diffuse color */
    GLfloat Specular[4];                /**< specular color */
    GLfloat EyePosition[4];     /**< position in eye coordinates */
-   GLfloat EyeDirection[4];    /**< spotlight dir in eye coordinates */
+   GLfloat SpotDirection[4];   /**< spotlight direction in eye coordinates */
    GLfloat SpotExponent;
    GLfloat SpotCutoff;         /**< in degrees */
    GLfloat _CosCutoffNeg;      /**< = cos(SpotCutoff) */
@@ -479,7 +479,7 @@ struct gl_light
    GLfloat _Position[4];       /**< position in eye/obj coordinates */
    GLfloat _VP_inf_norm[3];    /**< Norm direction to infinite light */
    GLfloat _h_inf_norm[3];     /**< Norm( _VP_inf_norm + <0,0,1> ) */
-   GLfloat _NormDirection[4];  /**< normalized spotlight direction */
+   GLfloat _NormSpotDirection[4]; /**< normalized spotlight direction */
    GLfloat _VP_inf_spot_attenuation;
 
    GLfloat _SpotExpTable[EXP_TABLE_SIZE][2];  /**< to replace a pow() call */
@@ -1296,7 +1296,6 @@ struct gl_texture_object
    GLenum Target;               /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */
    GLfloat Priority;           /**< in [0,1] */
    GLfloat BorderColor[4];     /**< unclamped */
-   GLchan _BorderChan[4];      /**< clamped, as GLchan */
    GLenum WrapS;               /**< S-axis texture image wrap mode */
    GLenum WrapT;               /**< T-axis texture image wrap mode */
    GLenum WrapR;               /**< R-axis texture image wrap mode */
@@ -1338,18 +1337,23 @@ struct gl_texture_object
 };
 
 
+/** Up to four combiner sources are possible with GL_NV_texture_env_combine4 */
+#define MAX_COMBINER_TERMS 4
+
+
 /**
  * Texture combine environment state.
- * Up to four combiner sources are possible with GL_NV_texture_env_combine4.
  */
 struct gl_tex_env_combine_state
 {
    GLenum ModeRGB;       /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */
    GLenum ModeA;         /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */
-   GLenum SourceRGB[4];  /**< GL_PRIMARY_COLOR, GL_TEXTURE, etc. */
-   GLenum SourceA[4];    /**< GL_PRIMARY_COLOR, GL_TEXTURE, etc. */
-   GLenum OperandRGB[4]; /**< SRC_COLOR, ONE_MINUS_SRC_COLOR, etc */
-   GLenum OperandA[4];   /**< SRC_ALPHA, ONE_MINUS_SRC_ALPHA, etc */
+   /** Source terms: GL_PRIMARY_COLOR, GL_TEXTURE, etc */
+   GLenum SourceRGB[MAX_COMBINER_TERMS];
+   GLenum SourceA[MAX_COMBINER_TERMS];
+   /** Source operands: GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, etc */
+   GLenum OperandRGB[MAX_COMBINER_TERMS];
+   GLenum OperandA[MAX_COMBINER_TERMS];
    GLuint ScaleShiftRGB; /**< 0, 1 or 2 */
    GLuint ScaleShiftA;   /**< 0, 1 or 2 */
    GLuint _NumArgsRGB;   /**< Number of inputs used for the RGB combiner */
@@ -1390,6 +1394,8 @@ struct gl_texture_unit
    GLbitfield _GenFlags;       /**< Bitwise-OR of Gen[STRQ]._ModeBit */
 
    GLfloat LodBias;            /**< for biasing mipmap levels */
+   GLenum BumpTarget;
+   GLfloat RotMatrix[4]; /* 2x2 matrix */
 
    /** 
     * \name GL_EXT_texture_env_combine 
@@ -1954,6 +1960,8 @@ struct gl_query_state
 /** Set by #pragma directives */
 struct gl_sl_pragmas
 {
+   GLboolean IgnoreOptimize;  /**< ignore #pragma optimize(on/off) ? */
+   GLboolean IgnoreDebug;     /**< ignore #pragma debug(on/off) ? */
    GLboolean Optimize;  /**< defaults on */
    GLboolean Debug;     /**< defaults off */
 };
@@ -1970,6 +1978,7 @@ struct gl_shader
    GLboolean DeletePending;
    GLboolean CompileStatus;
    GLboolean Main;  /**< shader defines main() */
+   GLboolean UnresolvedRefs;
    const GLchar *Source;  /**< Source code string */
    struct gl_program *Program;  /**< Post-compile assembly code */
    GLchar *InfoLog;
@@ -2024,6 +2033,7 @@ struct gl_shader_state
    GLboolean EmitComments;              /**< Annotated instructions */
    void *MemPool;
    GLbitfield Flags;                    /**< Mask of GLSL_x flags */
+   struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
 };
 
 
@@ -2236,7 +2246,15 @@ struct gl_renderbuffer_attachment
 struct gl_framebuffer
 {
    _glthread_Mutex Mutex;  /**< for thread safety */
-   GLuint Name;            /**< if zero, this is a window system framebuffer */
+   /**
+    * If zero, this is a window system framebuffer.  If non-zero, this
+    * is a FBO framebuffer; note that for some devices (i.e. those with
+    * a natural pixel coordinate system for FBOs that differs from the
+    * OpenGL/Mesa coordinate system), this means that the viewport,
+    * polygon face orientation, and polygon stipple will have to be inverted.
+    */
+   GLuint Name;
+
    GLint RefCount;
    GLboolean DeletePending;
 
@@ -2380,6 +2398,8 @@ struct gl_constants
    GLuint MaxSamples;            /**< GL_ARB_framebuffer_object */
 
    GLuint MaxVarying;  /**< Number of float[4] varying parameters */
+
+   GLbitfield SupportedBumpUnits; /**> units supporting GL_ATI_envmap_bumpmap as targets */
 };
 
 
@@ -2476,6 +2496,7 @@ struct gl_extensions
    GLboolean APPLE_client_storage;
    GLboolean APPLE_packed_pixels;
    GLboolean APPLE_vertex_array_object;
+   GLboolean ATI_envmap_bumpmap;
    GLboolean ATI_texture_mirror_once;
    GLboolean ATI_texture_env_combine3;
    GLboolean ATI_fragment_shader;
@@ -2487,6 +2508,7 @@ struct gl_extensions
    GLboolean MESA_resize_buffers;
    GLboolean MESA_ycbcr_texture;
    GLboolean MESA_texture_array;
+   GLboolean MESA_texture_signed_rgba;
    GLboolean NV_blend_square;
    GLboolean NV_fragment_program;
    GLboolean NV_light_max_exponent;