subject to change, and that Fl_Gl_Window::mode(int a) is the adequate stable API.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10862 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2) improved window creation in iconized state (child windows still don't show in icon, though).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10860 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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
Fl_Gl_Window::(const int *a) member function that uses a zero-ending
array of system-dependent attributes.
This procedure failed whenever a double buffer was asked for.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10854 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The argument 'draw_symbols' was inconsistently set with the intended
tooltip label alignment. This was confusing, but didn't do any harm
since the value was != 0 anyway.
Also added the 'image' and 'draw_symbols' argument to fl_draw() call.
Defined static constant draw_symbols_ for potential later inclusion in
Fl_Tooltip class and code clarification.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10850 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
extension name instead of old GL_TEXTURE_RECTANGLE_EXT.
Also, use the GL_BGRA format that is preferred for GL textures,
according to "Optimal Data Formats and Types" from
"Best Practices for Working with Texture Data".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
it is necessary only if all GL windows have been deleted.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This way someone hitting 'End' can see where the "cursor" is.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The -[NSWindow makeKeyAndOrderFront:] message used to make the window appear on the screen,
but, starting with 10.10 (approximately), this changed, and it became necessary to query for events
for a new window to appear on the screen. With 10.11 two event messages are needed.
The solution is therefore to implement Fl_Window::wait_for_expose().
- Calling NSDisableScreenUpdates()()/NSEnableScreenUpdates() before and after window updates
greatly accelerates multi-window update operations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
It's no longer necessary to apply a workaround for it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10825 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
replace it by CGContextReplacePathWithStrokedPath() + CGContextFillPath()
that does the same without error.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10821 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
from later OS versions.
Unfortunately, it does not work with Mac OS 10.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10818 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
use different pasteboard data type names according to running OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10817 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
graphics context to draw to a window. This requires Mac OS 10.4.
The advantage is that it is possible for a secondary thread to call
Fl_Window::make_current() without needing to create an autorelease pool.
We save the native graphics state, and also the state with origin at top.
Fl_X::q_release_context() restores the graphics state twice to return to
the native state. This allows to use a single graphics context for a single
window and a single thread.
Under 10.3, we have to create a new NSGraphicsContext when Fl_Window::make_current()
is called directly, so that secondary threads cannot call Fl_Window::make_current() without
having created an autorelease pool.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
- do not use NSOpenGLPFAMultisample
- do not use -[NSBitmapImageRep bitmapFormat]
that require Mac OS 10.4
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121