diff --git a/src/video.cpp b/src/video.cpp index 0814a5e3..7b366d2d 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -54,3 +54,18 @@ void Video::Clear() glMatrixMode(GL_MODELVIEW); 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]; +} + diff --git a/src/video.h b/src/video.h index 4b978b15..5131fc39 100644 --- a/src/video.h +++ b/src/video.h @@ -17,6 +17,8 @@ class Video public: static void Setup(int width, int height); static void Clear(); + static int GetWidth(); + static int GetHeight(); }; #endif // __DH_VIDEO_H__