Added ogre input capturer

This commit is contained in:
Nicolay Korslund 2010-07-10 13:29:44 +02:00
parent 18dc065715
commit 9f21081c13

View file

@ -0,0 +1,29 @@
#ifndef MANGLE_INPUT_OGREINPUTFRAME_H
#define MANGLE_INPUT_OGREINPUTFRAME_H
/*
This Ogre FrameListener calls capture() on an input driver every frame.
*/
#include <OgreFrameListener.h>
#include "../driver.hpp"
namespace Mangle {
namespace Input {
struct OgreInputCapture : Ogre::FrameListener
{
Mangle::Input::Driver &driver;
ExitListener(Mangle::Input::Driver &drv)
: driver(drv) {}
bool frameStarted(const FrameEvent &evt)
{
driver.capture();
return true;
}
};
}
#endif