5 #ifndef __cocoaopenglview__ 6 #define __cocoaopenglview__ 8 #include "../../iplatformopenglview.h" 10 #if VSTGUI_OPENGL_SUPPORT 14 #import <Cocoa/Cocoa.h> 24 class CocoaOpenGLView :
public IPlatformOpenGLView
27 CocoaOpenGLView (NSView* parent);
28 ~CocoaOpenGLView () noexcept override = default;
30 bool init (IOpenGLView* view, PixelFormat* pixelFormat =
nullptr) override;
31 void remove () override;
33 void invalidRect (const CRect& rect) override;
34 void viewSizeChanged (const CRect& visibleSize) override;
36 bool makeContextCurrent () override;
37 bool lockContext () override;
38 bool unlockContext () override;
40 void swapBuffers () override;
42 void doDraw (const CRect& r);
45 static
void initClass ();
48 NSOpenGLView* platformView;
50 PixelFormat pixelFormat;
56 #endif // VSTGUI_OPENGL_SUPPORT 58 #endif // __cocoaopenglview__ Definition: customcontrols.cpp:8