typedef enum gl_state_index_ {
STATE_NOT_STATE_VAR = 0,
- STATE_MATERIAL = 100, /* start at 100 so small ints are seen as ints */
+ STATE_MATERIAL,
STATE_LIGHT, /* One gl_light attribute. */
STATE_LIGHT_ARRAY, /* Multiple gl_light attributes loaded at once. */
STATE_LIGHTPROD,
STATE_TEXGEN,
+ STATE_TEXENV_COLOR,
STATE_FOG_COLOR,
STATE_FOG_PARAMS,
STATE_PROGRAM_MATRIX_TRANSPOSE,
STATE_PROGRAM_MATRIX_INVTRANS,
- /* These 8 enums must be in the same order as the gl_light union members,
- * which should also match the order of gl_LightSource members.
- */
- STATE_AMBIENT,
- STATE_DIFFUSE,
- STATE_SPECULAR,
- STATE_POSITION, /**< xyzw = position */
- STATE_HALF_VECTOR,
- STATE_SPOT_DIRECTION, /**< xyz = direction, w = cos(cutoff) */
- STATE_ATTENUATION, /**< xyz = attenuation, w = spot exponent */
- STATE_SPOT_CUTOFF, /**< x = cutoff, yzw = undefined */
-
- STATE_EMISSION,
- STATE_SHININESS,
-
- /* These 8 enums must be in the same order as the memory layout of
- * gl_fixedfunc_texture_unit::EyePlane/ObjectPlane.
- */
- STATE_TEXGEN_EYE_S,
- STATE_TEXGEN_EYE_T,
- STATE_TEXGEN_EYE_R,
- STATE_TEXGEN_EYE_Q,
- STATE_TEXGEN_OBJECT_S,
- STATE_TEXGEN_OBJECT_T,
- STATE_TEXGEN_OBJECT_R,
- STATE_TEXGEN_OBJECT_Q,
-
- STATE_TEXENV_COLOR,
-
STATE_NUM_SAMPLES, /* An integer, not a float like the other state vars */
STATE_DEPTH_RANGE,
- STATE_VERTEX_PROGRAM_ENV,
- STATE_VERTEX_PROGRAM_ENV_ARRAY,
- STATE_VERTEX_PROGRAM_LOCAL,
- STATE_VERTEX_PROGRAM_LOCAL_ARRAY,
STATE_FRAGMENT_PROGRAM_ENV,
STATE_FRAGMENT_PROGRAM_ENV_ARRAY,
STATE_FRAGMENT_PROGRAM_LOCAL,
STATE_FRAGMENT_PROGRAM_LOCAL_ARRAY,
+ STATE_VERTEX_PROGRAM_ENV,
+ STATE_VERTEX_PROGRAM_ENV_ARRAY,
+ STATE_VERTEX_PROGRAM_LOCAL,
+ STATE_VERTEX_PROGRAM_LOCAL_ARRAY,
+ STATE_NORMAL_SCALE_EYESPACE,
STATE_CURRENT_ATTRIB, /* ctx->Current vertex attrib value */
STATE_CURRENT_ATTRIB_MAYBE_VP_CLAMPED, /* ctx->Current vertex attrib value after passthrough vertex processing */
STATE_NORMAL_SCALE,
- STATE_NORMAL_SCALE_EYESPACE,
STATE_FOG_PARAMS_OPTIMIZED, /* for faster fog calc */
STATE_POINT_SIZE_CLAMPED, /* includes implementation dependent size clamp */
STATE_LIGHT_SPOT_DIR_NORMALIZED, /* pre-normalized spot dir */
STATE_ALPHA_REF, /* alpha-test reference value */
STATE_CLIP_INTERNAL, /* similar to STATE_CLIPPLANE, but in clip-space */
- STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */
+ STATE_INTERNAL_DRIVER, /* first available state index for drivers (must be last) */
+
+
+ /** All enums below don't occur in state[0]. **/
+
+ /* These 8 enums must be in the same order as the gl_light union members,
+ * which should also match the order of gl_LightSource members.
+ */
+ STATE_AMBIENT,
+ STATE_DIFFUSE,
+ STATE_SPECULAR,
+ STATE_POSITION, /**< xyzw = position */
+ STATE_HALF_VECTOR,
+ STATE_SPOT_DIRECTION, /**< xyz = direction, w = cos(cutoff) */
+ STATE_ATTENUATION, /**< xyz = attenuation, w = spot exponent */
+ STATE_SPOT_CUTOFF, /**< x = cutoff, yzw = undefined */
+
+ STATE_EMISSION,
+ STATE_SHININESS,
+
+ /* These 8 enums must be in the same order as the memory layout of
+ * gl_fixedfunc_texture_unit::EyePlane/ObjectPlane.
+ */
+ STATE_TEXGEN_EYE_S,
+ STATE_TEXGEN_EYE_T,
+ STATE_TEXGEN_EYE_R,
+ STATE_TEXGEN_EYE_Q,
+ STATE_TEXGEN_OBJECT_S,
+ STATE_TEXGEN_OBJECT_T,
+ STATE_TEXGEN_OBJECT_R,
+ STATE_TEXGEN_OBJECT_Q,
} gl_state_index;