Browse Source

Testing

gh-pages
falkTX 10 years ago
parent
commit
edf7cebc93
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      dgl/src/Window.cpp

+ 5
- 4
dgl/src/Window.cpp View File

@@ -587,17 +587,18 @@ struct Window::PrivateData {
else
{
// limit viewport to widget bounds
glViewport(widget->getAbsoluteX(), fView->height - widget->getHeight() - widget->getAbsoluteY(), widget->getWidth(), widget->getHeight());
//glViewport(widget->getAbsoluteX(), fView->height - widget->getHeight() - widget->getAbsoluteY(), widget->getWidth(), widget->getHeight());
glViewport(widget->getAbsoluteX(), fView->height - widget->getHeight() - widget->getAbsoluteY(), fView->width, fView->height);

// scale contents to match viewport size
glPushMatrix();
glScalef(float(fView->width)/float(widget->getWidth()), float(fView->height)/float(widget->getHeight()), 1.0f);
//glPushMatrix();
//glScalef(float(fView->width)/float(widget->getWidth()), float(fView->height)/float(widget->getHeight()), 1.0f);

// display widget
widget->onDisplay();

// done
glPopMatrix();
//glPopMatrix();
}
}
}


Loading…
Cancel
Save