소스 검색

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

legacy
Sam Hocevar sam 15 년 전
부모
커밋
d2e5bba88e
2개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. +15
    -0
      src/video.cpp
  2. +2
    -0
      src/video.h

+ 15
- 0
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];
}


+ 2
- 0
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__


불러오는 중...
취소
저장