void EventViewer::onGraphics(RenderDevice* rd, App* app, const shared_ptr<LocalLightingEnvironment>& lighting, Array<shared_ptr<Surface> >& surfaceArray) { app->colorClear = Color3::white(); rd->push2D(); { printEventQueue(rd); printWindowInformation(rd); printJoystickInformation(rd); } rd->pop2D(); }
void printEventQueue (EventQueue *queue) { if (queue == NULL) { return; } else if (peekEventQueueLength(queue) == 0) { free(queue); return; } Event *dequeued = dequeueEventQueue(queue); if (dequeued == NULL) { free(queue); return; } printEvent(stdout, dequeued); return printEventQueue(queue); }