summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Choice.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_Choice.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_Choice.cxx')
-rw-r--r--src/Fl_Gl_Choice.cxx7
1 files changed, 4 insertions, 3 deletions
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 <FL/fl_utf8.h>
#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