19 #ifndef EQ_AGL_WINDOW_H
20 #define EQ_AGL_WINDOW_H
22 #include <eq/defines.h>
25 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
27 #include <eq/client/agl/types.h>
28 #include <eq/client/glWindow.h>
34 namespace detail {
class Window; }
37 class WindowIF :
public GLWindow
41 WindowIF( NotifierInterface& parent,
const WindowSettings& settings )
42 : GLWindow( parent, settings ) {}
45 virtual ~WindowIF() {}
48 virtual AGLContext getAGLContext()
const = 0;
51 virtual WindowRef getCarbonWindow()
const = 0;
54 virtual AGLPbuffer getAGLPBuffer()
const = 0;
60 virtual bool isThreaded()
const {
return false; }
62 # pragma clang diagnostic push
63 # pragma clang diagnostic ignored "-Woverloaded-virtual"
65 EQ_API
virtual bool processEvent(
const WindowEvent& event ) = 0;
66 # pragma clang diagnostic pop
70 class Window :
public WindowIF
81 EQ_API Window( NotifierInterface& parent,
const WindowSettings& settings,
82 const CGDirectDisplayID displayID,
const bool threaded );
85 EQ_API
virtual ~Window();
98 EQ_API
virtual void setAGLContext( AGLContext context );
106 EQ_API
virtual void setCarbonWindow( WindowRef window );
114 EQ_API
virtual void setAGLPBuffer( AGLPbuffer pbuffer );
117 EQ_API AGLContext getAGLContext()
const override;
120 EQ_API WindowRef getCarbonWindow()
const override;
123 EQ_API AGLPbuffer getAGLPBuffer()
const override;
129 EQ_API
bool isThreaded()
const override;
132 CGDirectDisplayID getCGDisplayID()
const;
148 EQ_API
virtual bool configInit();
151 EQ_API
virtual void configExit( );
165 EQ_API
virtual AGLPixelFormat chooseAGLPixelFormat();
176 EQ_API
virtual void destroyAGLPixelFormat( AGLPixelFormat format );
190 EQ_API
virtual AGLContext createAGLContext( AGLPixelFormat format );
202 EQ_API
virtual bool configInitAGLDrawable();
215 EQ_API
virtual bool configInitAGLFullscreen();
228 EQ_API
virtual bool configInitAGLWindow();
238 EQ_API
virtual bool configInitAGLPBuffer();
244 EQ_API
virtual void initEventHandler();
250 EQ_API
virtual void exitEventHandler();
256 EQ_API
virtual void makeCurrent(
const bool cache =
true )
const;
259 EQ_API
virtual void swapBuffers();
262 EQ_API
virtual void joinNVSwapBarrier(
const uint32_t group,
263 const uint32_t barrier );
266 EQ_API
virtual bool processEvent(
const WindowEvent& event );
270 detail::Window*
const _impl;
272 void _initSwapSync( AGLContext context );
277 #endif // EQ_AGL_WINDOW_H