- Call pd->graphics->pushContext(NULL) to push a new context onto the stack
- If I call pd->graphics->setDrawOffset(100, 100) then all of my draw calls will have their origin set to (100, 100). Cool. This is what I expect.
- Again call pushContext(NULL), followed by setDrawOffset(20, 20)
I would expect my draw calls to have their origin at (120, 120) because I never popped the first context. I would expect my current context to be "offset" relative to the prior context. Unfortunately however, the origin is now (20, 20).
I'm not sure whether this is a bug or a an intended feature, but it's quite unintuitive given that contexts are structured as a stack.
If this is by design, perhaps new calls with different semantics would make sense. Something like "setOffset" and "setAbsoluteOffset" to enable both relative and absolute offsets.