1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
OpenMW/apps/openmw/mwrender/videoplayer.hpp

55 lines
1.0 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