summaryrefslogtreecommitdiff
path: root/src/Fl_PostScript.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-09-08 11:43:48 +0000
committerManolo Gouy <Manolo>2015-09-08 11:43:48 +0000
commitfa9880e7fe83080cb3fa15acd5ffcd28e4b8b4b3 (patch)
tree94382f7d8335dc939e5413ceee59e417eee03c24 /src/Fl_PostScript.cxx
parenta650237edf86dd7af0b82847bd48fb1bd2321085 (diff)
The Fl_Gl_Window public API offers 2 ways to control the OpenGL capabilities of a window:
1) Fl_Gl_Window::mode(int m) is platform-independent and uses an argument containing bit flags (e.g., FL_DOUBLE, FL_RGB8) to express desired capabilities. The m argument is assigned to the mode_ private member variable of the Fl_Gl_Window object. 2) Fl_Gl_Window::mode(const int *a) is highly platform-dependent. It uses a zero-ending array of attributes or attribute-value pairs to express capabilities. This member function can be used on the X11 and the Mac OS platforms, but not with MSWindows. Before this patch, the mode_ private member variable of the Fl_Gl_Window object is assigned 0 by this member function. The Fl_Gl_Window::flush() member function tests whether the FL_DOUBLE flag is ON in the mode_ variable, and changes code path accordingly. Therefore, the second API to control OpenGL capabilities fails when a double-buffered GL context is required, because the code path followed by Fl_Gl_Window::flush() does not match the GL context requirements. With this patch, Fl_Gl_Window::mode(const int *a) scans the content of its array argument, and sets the FL_DOUBLE bit of the mode_ member variable if the array requires a double-buffered GL context. This patch does that for the X11 platform. The same was introduced for the Mac OS platform at r. 10854. The MSWindows platform does not use the Fl_Gl_Window::mode(const int *a) API. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10859 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_PostScript.cxx')
0 files changed, 0 insertions, 0 deletions