1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00
OpenMW/apps/openmw/mwrender/videoplayer.hpp

55 lines
1.0 KiB
C++
Raw Normal View History

2012-12-11 21:49:31 +00:00
#ifndef VIDEOPLAYER_H
#define VIDEOPLAYER_H
2012-09-25 00:35:50 +00:00
#include <OgreMaterial.h>
2012-09-25 00:35:50 +00:00
namespace Ogre
2012-09-25 00:35:50 +00:00
{
class SceneManager;
class SceneNode;
class Rectangle2D;
class RenderWindow;
2012-09-25 00:35:50 +00:00
}
namespace MWRender
{
struct VideoState;
2012-09-25 00:35:50 +00:00
class VideoPlayer
{
public:
VideoPlayer(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* window);
2012-09-25 00:35:50 +00:00
~VideoPlayer();
void playVideo (const std::string& resourceName, bool allowSkipping);
2012-09-25 00:35:50 +00:00
void update();
void close();
void stopVideo();
2012-09-25 00:35:50 +00:00
2012-12-11 21:49:31 +00:00
bool isPlaying();
2012-12-15 18:23:03 +00:00
void setResolution (int w, int h) { mWidth = w; mHeight = h; }
2012-12-11 21:49:31 +00:00
private:
VideoState* mState;
bool mAllowSkipping;
2012-12-11 21:49:31 +00:00
Ogre::SceneManager* mSceneMgr;
Ogre::MaterialPtr mVideoMaterial;
Ogre::Rectangle2D* mRectangle;
2012-12-15 18:23:03 +00:00
Ogre::Rectangle2D* mBackgroundRectangle;
Ogre::SceneNode* mNode;
2012-12-15 18:23:03 +00:00
Ogre::SceneNode* mBackgroundNode;
Ogre::RenderWindow* mWindow;
2012-12-15 18:23:03 +00:00
int mWidth;
int mHeight;
2012-09-25 00:35:50 +00:00
};
}
#endif