diff options
| author | Manolo Gouy <Manolo> | 2016-04-19 16:58:17 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-19 16:58:17 +0000 |
| commit | 9f78323574ce8fbbcbf491980fdc9629b83a018a (patch) | |
| tree | ac33378cddf4b1a0140f664afb223ac40c410bdd /src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H | |
| parent | f29fb8c539a691fb798d2da6ad798c767e1076cd (diff) | |
Move GL-related static member functions of the Fl_X class on Mac OS to class Fl_Cocoa_Screen_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11662 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H')
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H index 4cde863d7..947d3d133 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H @@ -41,6 +41,15 @@ class Fl_Window; class Fl_Input; +#ifdef __OBJC__ +@class NSOpenGLPixelFormat; +@class NSOpenGLContext; +#else +class NSOpenGLPixelFormat; +class NSOpenGLContext; +#endif // __OBJC__ + + class FL_EXPORT Fl_Cocoa_Screen_Driver : public Fl_Screen_Driver { protected: @@ -55,6 +64,15 @@ protected: public: Fl_Cocoa_Screen_Driver(); static int next_marked_length; // next length of marked text after current marked text will have been replaced + // --- Cocoa-only members + // computes NSOpenGLPixelFormat from Gl window's mode + static NSOpenGLPixelFormat *mode_to_NSOpenGLPixelFormat(int mode, const int*); // uses Objective-c + static NSOpenGLContext* create_GLcontext_for_window(NSOpenGLPixelFormat *pixelformat, NSOpenGLContext *shared_ctx, Fl_Window *window); + static void GLcontext_update(NSOpenGLContext*); + static void GLcontext_flushbuffer(NSOpenGLContext*); + static void GLcontext_release(NSOpenGLContext*); + static void GLcontext_makecurrent(NSOpenGLContext*); + static void GL_cleardrawable(void); // --- display management // --- screen configuration virtual void init(); |
