c++ - Algorithm for maintaining a transformation matrix stack in graphics -
this question has answer here:
- modern opengl: vbo, glm , matrix stacks 4 answers
i trying write small 2d graphics library using sdl. want implement equivalent of matrix stack in opengl , implement functions pushmatrix() , popmatrix() in opengl. can coding matrix multiplications. need algorithm storing stack , managing transformations.
a stack array, or linked list, push operation creates copy of last/topmost element , appends @ end, , pop operation removes last element list/array.
using/implementing arrays/linked lists basic computer science knowledge.
Comments
Post a Comment