Changeset 139


Ignore:
Timestamp:
Aug 19, 2010, 2:58:29 AM (10 years ago)
Author:
sam
Message:

Implement Video::GetWidth() and Video::GetHeight().

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/video.cpp

    r135 r139  
    5555    glLoadIdentity();
    5656}
     57
     58int Video::GetWidth()
     59{
     60    GLint v[4];
     61    glGetIntegerv(GL_VIEWPORT, v);
     62    return v[2];
     63}
     64
     65int Video::GetHeight()
     66{
     67    GLint v[4];
     68    glGetIntegerv(GL_VIEWPORT, v);
     69    return v[3];
     70}
     71
  • trunk/src/video.h

    r105 r139  
    1818    static void Setup(int width, int height);
    1919    static void Clear();
     20    static int GetWidth();
     21    static int GetHeight();
    2022};
    2123
Note: See TracChangeset for help on using the changeset viewer.