00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef LINUX
00013
00014 #pragma once
00015
00016 #include "nvsgcommon.h"
00017
00018 #include "nvgl/GLContext.h"
00019 #include "nvui/RenderArea.h"
00020
00023 namespace nvui
00024 {
00026
00029 class GLWinRenderArea : public RenderArea
00030 {
00031 public:
00033 NVSG_API GLWinRenderArea(void);
00035 NVSG_API virtual ~GLWinRenderArea(void);
00036
00038
00040 NVSG_API virtual bool attachWindow( HWND hWnd
00041 );
00043
00046 NVSG_API virtual bool init( RenderArea * shareArea = NULL
00047 );
00049
00050 NVSG_API virtual void destroy( void );
00051
00053
00057 NVSG_API void makeCurrent( void );
00058
00060
00061 NVSG_API virtual void mouseButtonDown( UINT flags
00062 , int x
00063 , int y
00064 );
00066
00067 NVSG_API virtual void mouseButtonUp( UINT flags
00068 , int x
00069 , int y
00070 );
00072
00073 NVSG_API virtual void mouseMotion( int x
00074 , int y
00075 );
00076
00078
00080 NVSG_API virtual void setViewportSize( size_t x
00081 , size_t y
00082 );
00083
00085
00088 NVSG_API bool shareLists( GLWinRenderArea* ra );
00089
00091
00094 NVSG_API virtual void renderScene( void );
00095
00097
00099 NVSG_API virtual void triggerRedraw( void );
00100
00101 protected:
00102 HGLRC m_hglrc;
00103 HDC m_hdc;
00104
00106
00110 NVSG_API virtual bool initGL( void );
00111
00113
00116 NVSG_API UINT determinePixelFormat( void );
00117
00118 private:
00119 HWND m_hWindow;
00120 };
00121
00122 }
00123
00124 #endif //LINUX