aglWindow.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef EQ_OS_WINDOW_AGL_H
00020 #define EQ_OS_WINDOW_AGL_H
00021
00022 #include <eq/client/glWindow.h>
00023
00024 namespace eq
00025 {
00026 class AGLEventHandler;
00027 class AGLWindowEvent;
00028
00030 class EQ_EXPORT AGLWindowIF : public GLWindow
00031 {
00032 public:
00034 AGLWindowIF( Window* parent ) : GLWindow( parent ) {}
00035
00037 virtual ~AGLWindowIF() {}
00038
00040 virtual AGLContext getAGLContext() const = 0;
00041
00043 virtual WindowRef getCarbonWindow() const = 0;
00044
00046 virtual AGLPbuffer getAGLPBuffer() const = 0;
00047
00049 virtual bool processEvent( const AGLWindowEvent& event );
00050
00051 private:
00052 };
00053
00055 class EQ_EXPORT AGLWindow : public AGLWindowIF
00056 {
00057 public:
00059 AGLWindow( Window* parent );
00060
00062 virtual ~AGLWindow( );
00063
00064 virtual void configExit( );
00065 virtual void makeCurrent() const;
00066 virtual void swapBuffers();
00067 virtual void joinNVSwapBarrier( const uint32_t group,
00068 const uint32_t barrier );
00069
00071 virtual AGLContext getAGLContext() const { return _aglContext; }
00072
00074 virtual WindowRef getCarbonWindow() const { return _carbonWindow; }
00075
00077 virtual AGLPbuffer getAGLPBuffer() const { return _aglPBuffer; }
00078
00089 virtual void setAGLContext( AGLContext context );
00090
00096 virtual void setCarbonWindow( WindowRef window );
00097
00103 virtual void setAGLPBuffer( AGLPbuffer pbuffer );
00105
00118 virtual bool configInit();
00119
00131 virtual AGLPixelFormat chooseAGLPixelFormat();
00132
00141 virtual void destroyAGLPixelFormat( AGLPixelFormat pixelFormat );
00142
00154 virtual AGLContext createAGLContext( AGLPixelFormat pixelFormat );
00155
00165 virtual bool configInitAGLDrawable();
00166
00177 virtual bool configInitAGLFullscreen();
00178
00189 virtual bool configInitAGLWindow();
00190
00198 virtual bool configInitAGLPBuffer();
00199
00201 virtual void initEventHandler();
00202
00204 virtual void exitEventHandler();
00206
00207 virtual bool processEvent( const AGLWindowEvent& event );
00208
00209 private:
00211 AGLContext _aglContext;
00213 WindowRef _carbonWindow;
00215 AGLPbuffer _aglPBuffer;
00217 AGLEventHandler* _eventHandler;
00218
00219 union
00220 {
00221 char dummy[64];
00222 };
00223 };
00224 }
00225
00226 #endif // EQ_OS_WINDOW_AGL_H
00227