Browse Source

resize changes

opengl-renderer-broken
Martin Dørum 3 years ago
parent
commit
b4e194fe98
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      libcygnet/src/Window.cc

+ 2
- 3
libcygnet/src/Window.cc View File

@@ -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);
}


Loading…
Cancel
Save