19 #ifndef EQ_AGL_WINDOW_H 20 #define EQ_AGL_WINDOW_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; }
64 virtual bool processEvent( EventType type, EventRef )
68 virtual bool processEvent( EventType type, EventRef, SizeEvent& event )
72 virtual bool processEvent( EventType type, EventRef, PointerEvent& event )
76 virtual bool processEvent( EventType type, EventRef, KeyEvent& event )
81 class Window :
public WindowIF
92 EQ_API Window( NotifierInterface& parent,
const WindowSettings& settings,
93 const CGDirectDisplayID displayID,
const bool threaded );
96 EQ_API
virtual ~Window();
109 EQ_API
virtual void setAGLContext( AGLContext context );
117 EQ_API
virtual void setCarbonWindow( WindowRef window );
125 EQ_API
virtual void setAGLPBuffer( AGLPbuffer pbuffer );
128 EQ_API AGLContext getAGLContext()
const override;
131 EQ_API WindowRef getCarbonWindow()
const override;
134 EQ_API AGLPbuffer getAGLPBuffer()
const override;
140 EQ_API
bool isThreaded()
const override;
143 CGDirectDisplayID getCGDisplayID()
const;
159 EQ_API
bool configInit()
override;
162 EQ_API
void configExit()
override;
176 EQ_API
virtual AGLPixelFormat chooseAGLPixelFormat();
187 EQ_API
virtual void destroyAGLPixelFormat( AGLPixelFormat format );
201 EQ_API
virtual AGLContext createAGLContext( AGLPixelFormat format );
213 EQ_API
virtual bool configInitAGLDrawable();
226 EQ_API
virtual bool configInitAGLFullscreen();
239 EQ_API
virtual bool configInitAGLWindow();
249 EQ_API
virtual bool configInitAGLPBuffer();
255 EQ_API
virtual void initEventHandler();
261 EQ_API
virtual void exitEventHandler();
267 EQ_API
void makeCurrent(
const bool cache =
true )
const override;
270 EQ_API
void doneCurrent()
const override;
273 EQ_API
void swapBuffers()
override;
276 EQ_API
void joinNVSwapBarrier(
const uint32_t group,
277 const uint32_t barrier )
override;
279 EQ_API
bool processEvent( EventType type, EventRef eventRef,
280 SizeEvent& event )
override;
284 detail::Window*
const _impl;
286 void _initSwapSync( AGLContext context );
291 #endif // EQ_AGL_WINDOW_H Includes compile-time defines of Equalizer.
Includes operating system headers for OpenGL and the used window system(s) correctly.
EQ_API bool processEvent(EventType type)
Process a stateless event.
The Equalizer client library.