19 #ifndef EQ_AGL_WINDOW_H
20 #define EQ_AGL_WINDOW_H
22 #include <eq/defines.h>
26 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
28 #include <eq/agl/types.h>
29 #include <eq/glWindow.h>
35 namespace detail {
class Window; }
38 class WindowIF :
public GLWindow
42 WindowIF( NotifierInterface& parent,
const WindowSettings& settings )
43 : GLWindow( parent, settings ) {}
46 virtual ~WindowIF() {}
49 virtual AGLContext getAGLContext()
const = 0;
52 virtual WindowRef getCarbonWindow()
const = 0;
55 virtual AGLPbuffer getAGLPBuffer()
const = 0;
61 virtual bool isThreaded()
const {
return false; }
63 # pragma clang diagnostic push
64 # pragma clang diagnostic ignored "-Woverloaded-virtual"
66 EQ_API
virtual bool processEvent(
const WindowEvent& event ) = 0;
67 # pragma clang diagnostic pop
71 class Window :
public WindowIF
82 EQ_API Window( NotifierInterface& parent,
const WindowSettings& settings,
83 const CGDirectDisplayID displayID,
const bool threaded );
86 EQ_API
virtual ~Window();
99 EQ_API
virtual void setAGLContext( AGLContext context );
107 EQ_API
virtual void setCarbonWindow( WindowRef window );
115 EQ_API
virtual void setAGLPBuffer( AGLPbuffer pbuffer );
118 EQ_API AGLContext getAGLContext()
const override;
121 EQ_API WindowRef getCarbonWindow()
const override;
124 EQ_API AGLPbuffer getAGLPBuffer()
const override;
130 EQ_API
bool isThreaded()
const override;
133 CGDirectDisplayID getCGDisplayID()
const;
149 EQ_API
virtual bool configInit();
152 EQ_API
virtual void configExit( );
166 EQ_API
virtual AGLPixelFormat chooseAGLPixelFormat();
177 EQ_API
virtual void destroyAGLPixelFormat( AGLPixelFormat format );
191 EQ_API
virtual AGLContext createAGLContext( AGLPixelFormat format );
203 EQ_API
virtual bool configInitAGLDrawable();
216 EQ_API
virtual bool configInitAGLFullscreen();
229 EQ_API
virtual bool configInitAGLWindow();
239 EQ_API
virtual bool configInitAGLPBuffer();
245 EQ_API
virtual void initEventHandler();
251 EQ_API
virtual void exitEventHandler();
257 EQ_API
virtual void makeCurrent(
const bool cache =
true )
const;
260 EQ_API
virtual void swapBuffers();
263 EQ_API
virtual void joinNVSwapBarrier(
const uint32_t group,
264 const uint32_t barrier );
267 EQ_API
virtual bool processEvent(
const WindowEvent& event );
271 detail::Window*
const _impl;
273 void _initSwapSync( AGLContext context );
278 #endif // EQ_AGL_WINDOW_H
Includes operating system headers for OpenGL and the used window system(s) correctly.