]>
Dogcows Code - chaz/yoink/blob - src/Moof/Video.hh
d20ce4e5ff58c1d2d0af7dcd0611edd6844195ba
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
10 **************************************************************************/
12 #ifndef _MOOF_VIDEO_HH_
13 #define _MOOF_VIDEO_HH_
17 #include <boost/shared_ptr.hpp>
20 #include <Moof/Backend.hh>
21 #include <Moof/Dispatch.hh>
29 typedef boost::shared_ptr
<Video
> VideoP
;
39 int colorBuffer
[4]; // rgba
44 int accumBuffer
[4]; // rgba
46 int multisampleBuffers
;
47 int multisampleSamples
;
54 int mode
[3]; // width, height, bpp
61 Attributes(const Settings
& settings
);
71 static VideoP
alloc(const Attributes
& attribs
)
73 return VideoP(new Video(attribs
));
77 explicit Video(const Attributes
& attribs
);
80 void setVideoMode(const int mode
[3]);
81 Attributes
getAttributes() const;
83 void resize(int width
, int height
);
86 void setCaption(const std::string
& caption
);
87 std::string
getCaption() const;
89 const std::string
& getIcon() const;
91 void setFull(bool full
);
95 void setCursorVisible(bool hasCursor
);
96 void toggleCursorVisible();
97 bool isCursorVisible() const;
99 void setResizable(bool resizable
);
100 void toggleResizable();
101 bool isResizable() const;
103 void setCursorGrab(bool cursorGrab
);
104 void toggleCursorGrab();
105 bool isCursorGrab() const;
109 int getWidth() const;
110 int getHeight() const;
112 static Video
* current()
114 return gCurrentVideo
;
117 void makeCurrent() const;
119 void setDispatch(Dispatch
& dispatch
);
125 void recreateContext();
126 void setOpenGLAttributes();
130 // TODO this implementation should be hidden
132 SDL_Surface
* mContext
;
137 static Video
* gCurrentVideo
;
143 #endif // _MOOF_VIDEO_HH_
This page took 0.042689 seconds and 4 git commands to generate.