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

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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.