1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-23 20:53:52 +00:00
openmw-tes3mp/sound/clients/ogre_output_updater.hpp

32 lines
577 B
C++
Raw Normal View History

#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::SoundFactory &driver;
OgreOutputUpdater(Mangle::Sound::SoundFactory &drv)
: driver(drv)
{ assert(drv.needsUpdate); }
bool frameStarted(const Ogre::FrameEvent &evt)
{
driver.update();
return true;
}
};
}}
#endif