1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-23 16:53:53 +00:00
openmw/libs/mangle/sound/clients/ogre_output_updater.hpp
2012-03-11 18:13:59 +04:00

31 lines
583 B
C++

#ifndef MANGLE_SOUND_OGREUPDATER_H
#define MANGLE_SOUND_OGREUPDATER_H
/*
This Ogre FrameListener calls update on a SoundFactory
*/
#include <OgreFrameListener.h>
#include "../output.hpp"
#include <assert.h>
namespace Mangle {
namespace Sound {
struct OgreOutputUpdater : Ogre::FrameListener
{
Mangle::Sound::SoundFactoryPtr driver;
OgreOutputUpdater(Mangle::Sound::SoundFactoryPtr drv)
: driver(drv)
{ assert(drv->needsUpdate); }
bool frameStarted(const Ogre::FrameEvent &evt)
{
driver->update();
return true;
}
};
}}
#endif