• Home
  • Raw
  • Download

Lines Matching full:stack

62  * the top matrix of the current matrix stack and sets
105 * the top matrix of the current matrix stack and sets
138 * Set the current matrix stack.
140 * \param mode matrix stack.
146 * with the specified matrix stack.
216 * Push the current matrix stack.
220 * Verifies the current matrix stack is not full, and duplicates the top-most
221 * matrix in the stack.
222 * Marks __struct gl_contextRec::NewState with the stack dirty flag.
228 struct gl_matrix_stack *stack = ctx->CurrentStack; in _mesa_PushMatrix() local
234 if (stack->Depth + 1 >= stack->MaxDepth) { in _mesa_PushMatrix()
246 if (stack->Depth + 1 >= stack->StackSize) { in _mesa_PushMatrix()
247 unsigned new_stack_size = stack->StackSize * 2; in _mesa_PushMatrix()
249 GLmatrix *new_stack = realloc(stack->Stack, in _mesa_PushMatrix()
257 for (i = stack->StackSize; i < new_stack_size; i++) in _mesa_PushMatrix()
260 stack->Stack = new_stack; in _mesa_PushMatrix()
261 stack->StackSize = new_stack_size; in _mesa_PushMatrix()
264 _math_matrix_copy( &stack->Stack[stack->Depth + 1], in _mesa_PushMatrix()
265 &stack->Stack[stack->Depth] ); in _mesa_PushMatrix()
266 stack->Depth++; in _mesa_PushMatrix()
267 stack->Top = &(stack->Stack[stack->Depth]); in _mesa_PushMatrix()
268 ctx->NewState |= stack->DirtyFlag; in _mesa_PushMatrix()
273 * Pop the current matrix stack.
277 * Flushes the vertices, verifies the current matrix stack is not empty, and
278 * moves the stack head down.
279 * Marks __struct gl_contextRec::NewState with the dirty stack flag.
285 struct gl_matrix_stack *stack = ctx->CurrentStack; in _mesa_PopMatrix() local
293 if (stack->Depth == 0) { in _mesa_PopMatrix()
305 stack->Depth--; in _mesa_PopMatrix()
306 stack->Top = &(stack->Stack[stack->Depth]); in _mesa_PopMatrix()
307 ctx->NewState |= stack->DirtyFlag; in _mesa_PopMatrix()
317 * top-most matrix in the current stack.
318 * Marks __struct gl_contextRec::NewState with the stack dirty flag.
343 * matrix in the current stack and the given matrix.
344 * Marks __struct gl_contextRec::NewState with the dirty stack flag.
375 * matrix in the current stack and the given matrix. Marks
376 * __struct gl_contextRec::NewState with the dirty stack flag.
408 * matrix in the current stack and the given parameters. Marks
409 * __struct gl_contextRec::NewState with the dirty stack flag.
434 * matrix in the current stack and the given parameters. Marks
435 * __struct gl_contextRec::NewState with the dirty stack flag.
458 * matrix in the current stack and the given parameters. Marks
459 * __struct gl_contextRec::NewState with the dirty stack flag.
563 * Update the projection matrix stack.
568 * stack, and recomputes user clip positions if necessary.
645 /** Matrix stack initialization */
650 * Initialize a matrix stack.
652 * \param stack matrix stack.
653 * \param maxDepth maximum stack depth.
656 * Allocates an array of \p maxDepth elements for the matrix stack and calls
660 init_matrix_stack( struct gl_matrix_stack *stack, in init_matrix_stack() argument
665 stack->Depth = 0; in init_matrix_stack()
666 stack->MaxDepth = maxDepth; in init_matrix_stack()
667 stack->DirtyFlag = dirtyFlag; in init_matrix_stack()
668 /* The stack will be dynamically resized at glPushMatrix() time */ in init_matrix_stack()
669 stack->Stack = calloc(1, sizeof(GLmatrix)); in init_matrix_stack()
670 stack->StackSize = 1; in init_matrix_stack()
671 for (i = 0; i < stack->StackSize; i++) { in init_matrix_stack()
672 _math_matrix_ctr(&stack->Stack[i]); in init_matrix_stack()
674 stack->Top = stack->Stack; in init_matrix_stack()
678 * Free matrix stack.
680 * \param stack matrix stack.
682 * Calls _math_matrix_dtr() for each element of the matrix stack and
686 free_matrix_stack( struct gl_matrix_stack *stack ) in free_matrix_stack() argument
689 for (i = 0; i < stack->StackSize; i++) { in free_matrix_stack()
690 _math_matrix_dtr(&stack->Stack[i]); in free_matrix_stack()
692 free(stack->Stack); in free_matrix_stack()
693 stack->Stack = stack->Top = NULL; in free_matrix_stack()
694 stack->StackSize = 0; in free_matrix_stack()