| @@ -54,3 +54,18 @@ void Video::Clear() | |||||
| glMatrixMode(GL_MODELVIEW); | glMatrixMode(GL_MODELVIEW); | ||||
| glLoadIdentity(); | glLoadIdentity(); | ||||
| } | } | ||||
| int Video::GetWidth() | |||||
| { | |||||
| GLint v[4]; | |||||
| glGetIntegerv(GL_VIEWPORT, v); | |||||
| return v[2]; | |||||
| } | |||||
| int Video::GetHeight() | |||||
| { | |||||
| GLint v[4]; | |||||
| glGetIntegerv(GL_VIEWPORT, v); | |||||
| return v[3]; | |||||
| } | |||||
| @@ -17,6 +17,8 @@ class Video | |||||
| public: | public: | ||||
| static void Setup(int width, int height); | static void Setup(int width, int height); | ||||
| static void Clear(); | static void Clear(); | ||||
| static int GetWidth(); | |||||
| static int GetHeight(); | |||||
| }; | }; | ||||
| #endif // __DH_VIDEO_H__ | #endif // __DH_VIDEO_H__ | ||||