public void UpdateScissors(GLCmdScissorParameter currentScissors) { // scissor if (ChangesFoundInScissors(mPastScissors, currentScissors)) { mScissor.ApplyScissors(currentScissors); mPastScissors = currentScissors; } }
static bool ChangesFoundInScissors(GLCmdScissorParameter pastScissors, GLCmdScissorParameter currentScissors) { if (pastScissors == null && currentScissors != null) { return(true); } if (pastScissors != null && currentScissors == null) { return(false); } return(!pastScissors.Equals(currentScissors)); }