Pass:push

Saves a copy of the transform or render states. Further changes can be made to the transform or render states, and afterwards Pass:pop can be used to restore the original state. Pushes and pops can be nested, but it's an error to pop without a corresponding push.

Pass:push(stack)

Arguments

NameTypeDefaultDescription
stackStackType'transform' The type of stack to push.

Returns

Nothing

Notes

Each stack has a limit of the number of copies it can store. There can be 16 transforms and 4 render states saved.

The state stack does not save the camera info or shader variables changed with Pass:send.

See also