summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 285f01729..bfea32b23 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -3,7 +3,7 @@
//
// OpenGL window code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2016 by Bill Spitzak and others.
+// Copyright 1998-2017 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -601,12 +601,19 @@ char Fl_Cocoa_Gl_Window_Driver::swap_type() {return COPY;}
#include "drivers/WinAPI/Fl_WinAPI_Window_Driver.H"
#include <FL/x.H>
#include <FL/Fl_Graphics_Driver.H>
+#include <FL/Fl_Screen_Driver.H>
Fl_Gl_Window_Driver *Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *w)
{
return new Fl_WinAPI_Gl_Window_Driver(w);
}
+float Fl_WinAPI_Gl_Window_Driver::pixels_per_unit()
+{
+ return Fl::screen_driver()->scale(0);
+}
+
+
int Fl_WinAPI_Gl_Window_Driver::mode_(int m, const int *a) {
int oldmode = mode();
pWindow->context(0);
@@ -685,6 +692,8 @@ void* Fl_WinAPI_Gl_Window_Driver::GetProcAddress(const char *procName) {
#if defined(FL_CFG_GFX_XLIB)
#include <FL/x.H>
#include "Fl_Gl_Choice.H"
+#include <FL/Fl_Screen_Driver.H>
+#include <FL/Fl_Window_Driver.H>
Fl_Gl_Window_Driver *Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *w)
{
@@ -696,6 +705,12 @@ void Fl_X11_Gl_Window_Driver::before_show(int& need_redraw) {
if (overlay() && overlay() != pWindow) ((Fl_Gl_Window*)overlay())->show();
}
+float Fl_X11_Gl_Window_Driver::pixels_per_unit()
+{
+ int ns = pWindow->driver()->screen_num();
+ return Fl::screen_driver()->scale(ns);
+}
+
int Fl_X11_Gl_Window_Driver::mode_(int m, const int *a) {
int oldmode = mode();
if (a) { // when the mode is set using the a array of system-dependent values, and if asking for double buffer,