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
bool configInit()
override;
152 EQ_API
void configExit()
override;
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
void makeCurrent(
const bool cache =
true )
const override;
260 EQ_API
void doneCurrent()
const override;
263 EQ_API
void swapBuffers()
override;
266 EQ_API
void joinNVSwapBarrier(
const uint32_t group,
267 const uint32_t barrier )
override;
270 EQ_API
bool processEvent(
const WindowEvent& event )
override;
274 detail::Window*
const _impl;
276 void _initSwapSync( AGLContext context );
281 #endif // EQ_AGL_WINDOW_H
Includes operating system headers for OpenGL and the used window system(s) correctly.
The Equalizer client library.