Lines Matching refs:state
28 * Texture state handling.
41 #include "state.h"
49 * Default texture combine environment state. This is used to initialize
66 * Used by glXCopyContext to copy texture state from one context to another.
78 /* per-unit state */
166 * \param state texture_env_combine state vector to be filled-in.
173 calculate_derived_texenv( struct gl_tex_env_combine_state *state,
179 *state = default_combine_state;
183 state->SourceRGB[0] = GL_PREVIOUS;
196 state->SourceA[0] = GL_PREVIOUS;
220 state->SourceA[0] = GL_PREVIOUS;
231 state->SourceRGB[0] = GL_PREVIOUS;
240 state->SourceRGB[2] = GL_TEXTURE;
255 state->SourceA[0] = GL_CONSTANT;
256 state->OperandA[2] = GL_SRC_ALPHA;
265 state->SourceRGB[2] = GL_TEXTURE;
266 state->SourceA[2] = GL_TEXTURE;
267 state->SourceRGB[0] = GL_CONSTANT;
268 state->OperandRGB[2] = GL_SRC_COLOR;
285 state->ModeRGB = (state->SourceRGB[0] != GL_PREVIOUS)
287 state->ModeA = (state->SourceA[0] != GL_PREVIOUS)
374 /* Don't flush vertices. This is a "latched" state. */
420 * Translate GL combiner state into a MODE_x value
494 struct gl_tex_env_combine_state *state = texUnit->_CurrentCombine;
499 packed->ModeRGB = tex_combine_translate_mode(texUnit->EnvMode, state->ModeRGB);
500 packed->ModeA = tex_combine_translate_mode(texUnit->EnvMode, state->ModeA);
501 packed->ScaleShiftRGB = state->ScaleShiftRGB;
502 packed->ScaleShiftA = state->ScaleShiftA;
503 packed->NumArgsRGB = state->_NumArgsRGB;
504 packed->NumArgsA = state->_NumArgsA;
506 for (int i = 0; i < state->_NumArgsRGB; ++i)
508 packed->ArgsRGB[i].Source = tex_combine_translate_source(state->SourceRGB[i]);
509 packed->ArgsRGB[i].Operand = tex_combine_translate_operand(state->OperandRGB[i]);
512 for (int i = 0; i < state->_NumArgsA; ++i)
514 packed->ArgsA[i].Source = tex_combine_translate_source(state->SourceA[i]);
515 packed->ArgsA[i].Operand = tex_combine_translate_operand(state->OperandA[i]);
521 * Examine texture unit's combine/env state to update derived state.
535 * state, or the combiner state which is derived from traditional texenv
1025 * Initialize texture state for the given context.
1097 /* After we're done initializing the context's texture state the default
1150 * specified in the shared state and release those referencing the old
1151 * shared state.