part at the end of the Render function that should garuantee for this.
Basicly, each node ensures that it the scissor and translations get restored at the end of it's rendering function.
I've tried to work it out several times, but I can't seem to get it right...
Must be my brains shutting down after trying to design a system for school which by it's very definition and idea on how it should work resists all logic.:P
I got this:
An explanation, the first line of each node is the floating point notation.
The second one are the resulting values for the offset to point 0x0 (or the parents offset point).
The third line is the result of the "stack".
Something else that I've just tried, I tried outputting the result of this part:
// Make the scissor size always smaller
/* This means that the X and Y values can only get bigger
* And that the W and H values can only get smaller*/
glScissor((scissor > nX ? scissor : nX),
(scissor > nYtoUse ? scissor : nYtoUse),
(scissor < nW ? scissor : nW),
(scissor < nH ? scissor : nH));
The result was:
Which would suggest an error in my logic.
Or a flaw in my programming, since the line which outputs the scissor1 part is:
std::cout<<"scissor1:"<<(scissor > nX ? scissor : nX)<<":"<<
(scissor > nYtoUse ? scissor : nYtoUse)<<":"<<
(scissor < nW ? scissor : nW)<<":"<<
(scissor < nH ? scissor : nH)<<std::endl;
I think my current code supports siblings correctly.