mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-23 06:53:54 +00:00
32 lines
577 B
C++
32 lines
577 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::SoundFactory &driver;
|
||
|
|
||
|
OgreOutputUpdater(Mangle::Sound::SoundFactory &drv)
|
||
|
: driver(drv)
|
||
|
{ assert(drv.needsUpdate); }
|
||
|
|
||
|
bool frameStarted(const Ogre::FrameEvent &evt)
|
||
|
{
|
||
|
driver.update();
|
||
|
return true;
|
||
|
}
|
||
|
};
|
||
|
}}
|
||
|
|
||
|
#endif
|