summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-19 19:37:49 +0000
committerManolo Gouy <Manolo>2016-04-19 19:37:49 +0000
commit1e8a53ecc425cb91c39bdff263192fae2c372edb (patch)
tree02943c37fe4e984532109eadb6f752471d76421b /src/Fl_Gl_Window.cxx
parent4aa388d4ffb2f62986fb5dc7b06325a4dd0cf56a (diff)
Move private_dc from Fl_X for WIN32 platform to Fl_WinAPI_Window_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 241221698..fc8c47c51 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -32,6 +32,8 @@ extern int fl_gl_load_plugin;
#include <OpenGL/OpenGL.h>
#include "drivers/Cocoa/Fl_Cocoa_Window_Driver.H"
#include "drivers/Cocoa/Fl_Cocoa_Screen_Driver.H"
+#elif defined(WIN32)
+#include "drivers/WinAPI/Fl_WinAPI_Window_Driver.H"
#endif
#include <FL/Fl_Gl_Window.H>
#include <FL/Fl_Device.H>
@@ -257,10 +259,10 @@ void Fl_Gl_Window::swap_buffers() {
#elif defined(WIN32)
# if HAVE_GL_OVERLAY
// Do not swap the overlay, to match GLX:
- BOOL ret = wglSwapLayerBuffers(Fl_X::i(this)->private_dc, WGL_SWAP_MAIN_PLANE);
+ BOOL ret = wglSwapLayerBuffers(Fl_WinAPI_Window_Driver::driver(this)->private_dc, WGL_SWAP_MAIN_PLANE);
DWORD err = GetLastError();;
# else
- SwapBuffers(Fl_X::i(this)->private_dc);
+ SwapBuffers(Fl_WinAPI_Window_Driver::driver(this)->private_dc);
# endif
#elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
if(overlay != NULL) {
@@ -322,14 +324,14 @@ void Fl_Gl_Window::flush() {
&& (damage()&(FL_DAMAGE_OVERLAY|FL_DAMAGE_EXPOSE) || !save_valid)) {
fl_set_gl_context(this, (GLContext)overlay);
if (fl_overlay_depth)
- wglRealizeLayerPalette(Fl_X::i(this)->private_dc, 1, TRUE);
+ wglRealizeLayerPalette(Fl_WinAPI_Window_Driver::driver(this)->private_dc, 1, TRUE);
glDisable(GL_SCISSOR_TEST);
glClear(GL_COLOR_BUFFER_BIT);
fl_overlay = 1;
draw_overlay();
fl_overlay = 0;
valid_f_ = save_valid_f;
- wglSwapLayerBuffers(Fl_X::i(this)->private_dc, WGL_SWAP_OVERLAY1);
+ wglSwapLayerBuffers(Fl_WinAPI_Window_Driver::driver(this)->private_dc, WGL_SWAP_OVERLAY1);
// if only the overlay was damaged we are done, leave main layer alone:
if (damage() == FL_DAMAGE_OVERLAY) {
return;