1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 06:49:55 +00:00
openmw-tes3mp/apps/openmw/mwrender/videoplayer.hpp

54 lines
1 KiB
C++

#ifndef VIDEOPLAYER_H
#define VIDEOPLAYER_H
#include <OgreMaterial.h>
namespace Ogre
{
class SceneManager;
class SceneNode;
class Rectangle2D;
class RenderWindow;
}
namespace MWRender
{
struct VideoState;
class VideoPlayer
{
public:
VideoPlayer(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* window);
~VideoPlayer();
void playVideo (const std::string& resourceName, bool allowSkipping);
void update();
void close();
void stopVideo();
bool isPlaying();
void setResolution (int w, int h) { mWidth = w; mHeight = h; }
private:
VideoState* mState;
bool mAllowSkipping;
Ogre::SceneManager* mSceneMgr;
Ogre::MaterialPtr mVideoMaterial;
Ogre::Rectangle2D* mRectangle;
Ogre::Rectangle2D* mBackgroundRectangle;
Ogre::SceneNode* mNode;
Ogre::SceneNode* mBackgroundNode;
Ogre::RenderWindow* mWindow;
int mWidth;
int mHeight;
};
}
#endif