d3d_transform_stack_clear()- Clears the stack
d3d_transform_stack_empty()- Checks whether the stack is empty
d3d_transform_stack_push()- Adds the currently set transformation to the top of the stack
d3d_transform_stack_pop()- Takes the transformation from the top of the stack and sets the current transformation to it
d3d_transform_stack_top()- Peeks at the transformation at the top of the stack and sets the current transformation to it
d3d_transform_stack_discard()- Takes the transformation from the top of the stack and throws it away
I made the word "sets" bold because the stack functionality would be complete if popping from the stack added the transformation to the current transformation instead of throwing away all current transformations and setting it. The reason it is incomplete is that there is no way to insert a transformation before all other transformations by using stacks, which would be quite useful for hierarchical models. If popping did what I wanted it to do, this code would insert a transformation before the top one in the stack:
d3d_transform_set_identity(); d3d_transform_add_rotation_z(90); //Transformation to insert d3d_transform_stack_pop(); //Should add the transformation at the top of the stack to the current transformation, but instead makes the previous lines redundant.
My main question is, am I wrong, or should I file a bug report? I hope I explained it well enough.