]>
Dogcows Code - chaz/yoink/blob - src/Moof/Video.hh
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>
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
attributes() 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 void makeCurrent() const;
114 static Video
* current()
116 return gCurrentVideo
;
123 void recreateContext();
124 void setOpenGLAttributes();
128 // TODO this implementation should be hidden
130 SDL_Surface
* mContext
;
134 static Video
* gCurrentVideo
;
140 #endif // _MOOF_VIDEO_HH_
This page took 0.037259 seconds and 4 git commands to generate.