ソースを参照

resize changes

opengl-renderer-broken
Martin Dørum 3年前
コミット
b4e194fe98
1個のファイルの変更2行の追加3行の削除
  1. 2
    3
      libcygnet/src/Window.cc

+ 2
- 3
libcygnet/src/Window.cc ファイルの表示

@@ -51,9 +51,8 @@ void Window::flip() {
void Window::onResize(int w, int h) {
w_ = w;
h_ = h;
float ratio = (float)h / (float)w;
yScale_ = 1 / ratio;
xScale_ = 1;
yScale_ = 1 / sqrt((float)h / (float)w);
xScale_ = 1 / sqrt((float)w / (float)h);
glViewport(0, 0, w, h);
}


読み込み中…
キャンセル
保存