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/osWindow.h>
00023
00024 namespace eq
00025 {
00026 class AGLEventHandler;
00027 class AGLWindowEvent;
00028
00030 class EQ_EXPORT AGLWindowIF : public OSWindow
00031 {
00032 public:
00033 AGLWindowIF( Window* parent ) : OSWindow( parent ) {}
00034 virtual ~AGLWindowIF() {}
00035
00037 virtual AGLContext getAGLContext() const = 0;
00038
00040 virtual WindowRef getCarbonWindow() const = 0;
00041
00043 virtual AGLPbuffer getAGLPBuffer() const = 0;
00044
00046 virtual bool processEvent( const AGLWindowEvent& event );
00047
00048 private:
00049 };
00050
00052 class EQ_EXPORT AGLWindow : public AGLWindowIF
00053 {
00054 public:
00055 AGLWindow( Window* parent );
00056 virtual ~AGLWindow( );
00057
00058 virtual void configExit( );
00059 virtual void makeCurrent() const;
00060 virtual void swapBuffers();
00061 virtual void joinNVSwapBarrier( const uint32_t group,
00062 const uint32_t barrier );
00063
00065 virtual AGLContext getAGLContext() const { return _aglContext; }
00066
00068 virtual WindowRef getCarbonWindow() const { return _carbonWindow; }
00069
00071 virtual AGLPbuffer getAGLPBuffer() const { return _aglPBuffer; }
00072
00084 virtual void setAGLContext( AGLContext context );
00085
00091 virtual void setCarbonWindow( WindowRef window );
00092
00098 virtual void setAGLPBuffer( AGLPbuffer pbuffer );
00100
00113 virtual bool configInit();
00114
00126 virtual AGLPixelFormat chooseAGLPixelFormat();
00127
00136 virtual void destroyAGLPixelFormat( AGLPixelFormat pixelFormat );
00137
00149 virtual AGLContext createAGLContext( AGLPixelFormat pixelFormat );
00150
00160 virtual bool configInitAGLDrawable();
00161
00172 virtual bool configInitAGLFullscreen();
00173
00184 virtual bool configInitAGLWindow();
00185
00193 virtual bool configInitAGLPBuffer();
00194
00195 virtual void initEventHandler();
00196 virtual void exitEventHandler();
00198
00199 virtual bool processEvent( const AGLWindowEvent& event );
00200
00201 private:
00203 AGLContext _aglContext;
00205 WindowRef _carbonWindow;
00207 AGLPbuffer _aglPBuffer;
00209 AGLEventHandler* _eventHandler;
00210
00211 union
00212 {
00213 char dummy[64];
00214 };
00215 };
00216 }
00217
00218 #endif // EQ_OS_WINDOW_AGL_H
00219