matrix_stack_pop


Description

This function pops the current top matrix off the stack.


Syntax:

matrix_stack_pop();


Returns:

N/A


Example:

var m1 = matrix_build(66, 145, 0, 0, 0, 0, 1, 1, 1);
var m2 = matrix_build(0, 0, 0, 0, 0, image_angle * 6, 1, 1, 1) ;
matrix_stack_push(m1);
matrix_stack_push(m2);
matrix_set(matrix_world, matrix_stack_top());
draw_sprite(tyre, 0, 0, 0);
matrix_stack_pop();
matrix_stack_pop();

The above code will build two new matrices and then push them onto the matrix stack. The world matrix is then set to the top of the stack, a sprite is drawn and the transforms are then popped from the stack.