osWindow.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef EQ_OS_WINDOW_H
00020 #define EQ_OS_WINDOW_H
00021
00022 #include <eq/client/types.h>
00023 #include <eq/client/window.h>
00024 #include <eq/client/windowSystem.h>
00025
00026 namespace eq
00027 {
00028 class FrameBufferObject;
00029
00037 class EQ_EXPORT OSWindow
00038 {
00039 public:
00040 OSWindow( Window* parent );
00041 virtual ~OSWindow( );
00042
00054 virtual bool configInit( ) = 0;
00055
00062 virtual void configExit( ) = 0;
00063
00071 virtual void makeCurrent() const;
00072
00074 virtual void bindFrameBuffer() const;
00075
00077 virtual void swapBuffers() = 0;
00078
00088 virtual void joinNVSwapBarrier( const uint32_t group,
00089 const uint32_t barrier ) = 0;
00091
00095 bool configInitFBO();
00096
00098 void configExitFBO();
00099
00101 const FrameBufferObject* getFBO() const { return _fbo; }
00103
00106 Window* getWindow() { return _window; }
00107 const Window* getWindow() const { return _window; }
00108
00109 Pipe* getPipe();
00110 const Pipe* getPipe() const;
00111
00112 Node* getNode();
00113 const Node* getNode() const;
00114
00115 Config* getConfig();
00116 const Config* getConfig() const;
00117
00118 int32_t getIAttribute( const Window::IAttribute attr ) const;
00119
00121 WGLEWContext* wglewGetContext();
00123
00125 void initGLEW();
00126
00128 void exitGLEW() { _glewInitialized = false; }
00129
00143 GLEWContext* glewGetContext() { return _glewContext; }
00144 const GLEWContext* glewGetContext() const { return _glewContext; }
00145
00146 protected:
00148 Window* const _window;
00149
00150 private:
00152 GLEWContext* _glewContext;
00153
00154 bool _glewInitialized ;
00155
00157 FrameBufferObject* _fbo;
00158
00159 union
00160 {
00161 char dummy[64];
00162 };
00163 };
00164 }
00165
00166
00167 #endif // EQ_OS_WINDOW_H
00168