From 1e8a53ecc425cb91c39bdff263192fae2c372edb Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 19 Apr 2016 19:37:49 +0000 Subject: 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 --- src/Fl_Gl_Choice.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Fl_Gl_Choice.cxx') diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index 1ea351e57..6d5e8f6e4 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -29,6 +29,7 @@ # include #if defined(WIN32) +#include "drivers/WinAPI/Fl_WinAPI_Window_Driver.H" #elif defined(__APPLE__) // PORTME: platform OpenGL management #include "drivers/Cocoa/Fl_Cocoa_Screen_Driver.H" #elif defined(FL_PORTING) @@ -227,9 +228,9 @@ GLContext fl_create_gl_context(XVisualInfo* vis) { GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer) { Fl_X* i = Fl_X::i(window); - HDC hdc = i->private_dc; + HDC hdc = Fl_WinAPI_Window_Driver::driver(window)->private_dc; if (!hdc) { - hdc = i->private_dc = GetDCEx(i->xid, 0, DCX_CACHE); + hdc = Fl_WinAPI_Window_Driver::driver(window)->private_dc = GetDCEx(i->xid, 0, DCX_CACHE); fl_save_dc(i->xid, hdc); SetPixelFormat(hdc, g->pixelformat, (PIXELFORMATDESCRIPTOR*)(&g->pfd)); # if USE_COLORMAP @@ -273,7 +274,7 @@ void fl_set_gl_context(Fl_Window* w, GLContext context) { # if defined(USE_X11) glXMakeCurrent(fl_display, fl_xid(w), context); # elif defined(WIN32) - wglMakeCurrent(Fl_X::i(w)->private_dc, context); + wglMakeCurrent(Fl_WinAPI_Window_Driver::driver(w)->private_dc, context); # elif defined(__APPLE__) // PORTME: platform OpenGL management Fl_Cocoa_Screen_Driver::GLcontext_makecurrent(context); # else -- cgit v1.2.3