private static void ClockTick(object state) { _qtest.Write(true); //wipes out the composition target _composition.Clear(); //renders the objects against the target for (int i = 0; i < BallCount; i++) { _renderables[i].OnRender(_composition); } //dumps the composition to the physical device _renderer.Dump(_composition); _qtest.Write(false); }
private static void ClockTick(object state) { _qtest.Write(true); if ((_counter & 3) == 0) { //check for browsing buttons if (_btnLeft.Read() == false) { _demoIndex--; if (_demoIndex < 0) { _demoIndex = DemoTable.Length - 1; } } else if (_btnRight.Read() == false) { _demoIndex++; if (_demoIndex >= DemoTable.Length) { _demoIndex = 0; } } } //wipes out the composition target _composition.Clear(); //perform demo rendering DemoTable[_demoIndex](); //dumps the composition to the physical device _renderer.Dump(_composition); ++_counter; _qtest.Write(false); }