diff options
Diffstat (limited to 'documentation/opengl.html')
| -rw-r--r-- | documentation/opengl.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/documentation/opengl.html b/documentation/opengl.html index 5ed567992..8a5ab0aa7 100644 --- a/documentation/opengl.html +++ b/documentation/opengl.html @@ -283,9 +283,15 @@ void OptimizerWindow::draw() { // This is the first time we've been asked to draw; create the // Optimizer context for the scene... +#ifdef WIN32 + context_ = new csContext((HDC)fl_getHDC()); + context_->ref(); + context_->makeCurrent((HDC)fl_getHDC()); +#else context_ = new csContext(fl_display, fl_visual); context_->ref(); context_->makeCurrent(fl_display, fl_window); +#endif // WIN32 ... perform other context setup as desired ... @@ -296,6 +302,12 @@ void OptimizerWindow::draw() { draw_action_->setCamera(camera_); camera_->draw(draw_action_); } + } else { +#ifdef WIN32 + context_->makeCurrent((HDC)fl_getHDC()); +#else + context_->makeCurrent(fl_display, fl_window); +#endif // WIN32 } if (!valid()) { |
