Jump to content


Photo

Transformation functionality incomplete


  • Please log in to reply
No replies to this topic

#1 Super Lala

Super Lala

    GMC Member

  • New Member
  • 95 posts

Posted 15 July 2012 - 03:58 PM

Game Maker has several functions to create and handle a transformation stack. However, it is not as good at creating hierarchical models as the documentation says.

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.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users