Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/cfg/RenderSurface.h

    r12292 r13041  
    3434    \brief A RenderSurface provides a rendering surface for 3D graphics applications. 
    3535 
    36     A RenderSurface creates a window in a windowing system for the purpose of 3D  
     36    A RenderSurface creates a window in a windowing system for the purpose of 3D 
    3737    rendering.  The focus of a RenderSurface differs from a windowing system window 
    3838    in that it is not a user input/output device, but rather a context and screen area 
    39     specifically designed for 3D applications.  Consequently, a RenderSurface does not  
     39    specifically designed for 3D applications.  Consequently, a RenderSurface does not 
    4040    provide or impose a requirement on the caller to structure the application around 
    41     the capturing or handling of events.  Further, RenderSurface provides increased  
     41    the capturing or handling of events.  Further, RenderSurface provides increased 
    4242    control over the quality of pixel formats. 
    4343 */ 
     
    5151        static unsigned int _numScreens; 
    5252 
    53         class Callback : public osg::Referenced  
     53        class Callback : public osg::Referenced 
    5454        { 
    5555            public: 
     
    6161        }; 
    6262 
    63         struct InputRectangle  
     63        struct InputRectangle 
    6464        { 
    6565            public: 
     
    6767                InputRectangle( float left, float right, float bottom, float top ): 
    6868                    _left(left), _bottom(bottom), _width(right-left), _height(top-bottom) {} 
    69                 InputRectangle(const InputRectangle &ir)  
     69                InputRectangle(const InputRectangle &ir) 
    7070                { 
    7171                     _left = ir._left; 
     
    7575                } 
    7676                virtual ~InputRectangle() {} 
    77          
     77 
    7878                void set( float left, float right, float bottom, float top ) 
    7979                { 
     
    8787                float width() const { return _width; } 
    8888                float height() const { return _height; } 
    89          
     89 
    9090            protected: 
    91          
     91 
    9292            private: 
    9393                float _left, _bottom, _width, _height; 
     
    118118        void setHostName( const std::string & ); 
    119119 
    120         /**  
    121           * Get the name of the Host the window is to be created on.  
     120        /** 
     121          * Get the name of the Host the window is to be created on. 
    122122          * Ignored on Win32 */ 
    123123        const std::string& getHostName( void ) const; 
    124124 
    125         /**  
    126           * Set the number of the display the render surface is to  
     125        /** 
     126          * Set the number of the display the render surface is to 
    127127          * be created on.  In XWindows, this is the number of the 
    128128          * XServer.  Ignored on Win32   */ 
    129129        void setDisplayNum( int ); 
    130130 
    131         /** Get the number of the display the render surface is to  
     131        /** Get the number of the display the render surface is to 
    132132          * be created on.  In XWindows, this is the number of the 
    133133          * XServer.  Ignored on Win32   */ 
    134134        int getDisplayNum( void ) const; 
    135       
    136         /** Set the number of the screen the render surface is to  
     135 
     136        /** Set the number of the screen the render surface is to 
    137137          * be created on.  In XWindows, this is the number of the 
    138138          * XServer.  Ignored on Win32   */ 
    139139        void setScreenNum( int ); 
    140140 
    141         /** Get the number of the screen the render surface is to  
     141        /** Get the number of the screen the render surface is to 
    142142          * be created on.  In XWindows, this is the number of the 
    143143          * XServer.  Ignored on Win32   */ 
    144144        int getScreenNum( void ) const; 
    145145 
    146         /** Get the size of the screen in pixels the render surface  
     146        /** Get the size of the screen in pixels the render surface 
    147147          * is to be created on.  */ 
    148148        void getScreenSize( unsigned int &width, unsigned int &height ) const; 
    149          
     149 
    150150 
    151151        /** Default window name */ 
     
    159159        const std::string& getWindowName( void ) const; 
    160160 
    161         /** Set the windowing system rectangle the RenderSurface will  
     161        /** Set the windowing system rectangle the RenderSurface will 
    162162          * occupy on the screen.  The parameters are given as integers 
    163163          * in screen space.  x and y determine the lower left hand corner 
    164           * of the RenderSurface.  Width and height are given in screen  
     164          * of the RenderSurface.  Width and height are given in screen 
    165165          * coordinates */ 
    166         void  setWindowRectangle( int x, int y, unsigned int width, unsigned int height,  
     166        void  setWindowRectangle( int x, int y, unsigned int width, unsigned int height, 
    167167                                    bool resize=true ); 
    168         /** Get the windowing system rectangle the RenderSurface will  
     168        /** Get the windowing system rectangle the RenderSurface will 
    169169          * occupy on the screen.  The parameters are given as integers 
    170170          * in screen space.  x and y determine the lower left hand corner 
    171           * of the RenderSurface.  Width and height are given in screen  
     171          * of the RenderSurface.  Width and height are given in screen 
    172172          * coordinates */ 
    173173        void getWindowRectangle( int &x, int &y, unsigned int &width, unsigned int &height ) const; 
     
    234234         bool usesOverrideRedirect(); 
    235235 
    236        /** Request whether the window should have a visible cursor.  If true, the  
     236       /** Request whether the window should have a visible cursor.  If true, the 
    237237         * windowing system's default cursor will be assigned to the window.  If false 
    238238         * the window will not have a visible cursor. */ 
     
    248248        void setCursorToDefault(); 
    249249 
    250         /** Specify whether the RenderSurface should use a separate thread for  
    251           * window configuration events.  If flag is set to true, then the  
    252           * RenderSurface will spawn a new thread to manage events caused by  
     250        /** Specify whether the RenderSurface should use a separate thread for 
     251          * window configuration events.  If flag is set to true, then the 
     252          * RenderSurface will spawn a new thread to manage events caused by 
    253253          * resizing the window, mapping or destroying the window. */ 
    254254        void useConfigEventThread(bool flag); 
     
    256256        /** shareAllGLContexts will share all OpenGL Contexts between render surfaces 
    257257          * upon realize.  This must be called before any call to renderSurface::realize(). 
    258           */  
     258          */ 
    259259        static void shareAllGLContexts(bool); 
    260260 
     
    266266#if 0 
    267267        /** Realize the RenderSurface.  When realized, all components of the RenderSurface 
    268           * not already configured are configured, a window and a graphics context are  
     268          * not already configured are configured, a window and a graphics context are 
    269269          * created and made current.  If an already existing graphics context is passed 
    270           * through "sharedGLContext", then the graphics context created will share certain  
     270          * through "sharedGLContext", then the graphics context created will share certain 
    271271          * graphics constructs (such as display lists) with "sharedGLContext". */ 
    272272        bool realize( VisualChooser *vc=NULL, GLContext sharedGLContext=0 ); 
     
    279279        virtual void swapBuffers(void); 
    280280 
    281         /** Makes the graphics context and RenderSurface current for rendering */  
     281        /** Makes the graphics context and RenderSurface current for rendering */ 
    282282        bool makeCurrent(void) const; 
    283283 
    284         /** Where supported, sync() will synchronize with the vertical retrace signal of the  
     284        /** Where supported, sync() will synchronize with the vertical retrace signal of the 
    285285          * graphics display device.  \a divisor specifies the number of vertical retace signals 
    286286          * to allow before returning. */ 
     
    298298        static void initThreads(); 
    299299 
    300         /**  
     300        /** 
    301301         * Puts the calling thread to sleep until the RenderSurface is realized.  Returns true 
    302302         * if for success and false for failure. 
     
    304304        bool waitForRealize(); 
    305305 
    306         /** fullScreen(flag).  If flag is true, RenderSurface resizes its window to fill the  
     306        /** fullScreen(flag).  If flag is true, RenderSurface resizes its window to fill the 
    307307         * entire screen and turns off the border.  If false, the window is returned to a size 
    308          * previously specified.  If previous state specified a border around the window, a  
     308         * previously specified.  If previous state specified a border around the window, a 
    309309         * the border is replaced 
    310310         * */ 
     
    323323#endif 
    324324        void fullScreen( bool flag ); 
    325         /** setCustomFullScreenRencangle(x,y,width,height).  Programmer may set a customized  
     325        /** setCustomFullScreenRencangle(x,y,width,height).  Programmer may set a customized 
    326326          * rectangle to be interpreted as "fullscreen" when fullscreen(true) is called.  This 
    327327          * allows configurations that have large virtual screens that span more than one monitor 
     
    332332          * screen size as fullscreen rather than the custom full screen rectangle 
    333333          */ 
    334         void useDefaultFullScreenRectangle();  
    335  
    336         /** isFullScreen() returns true if the RenderSurface's window fills the entire screen  
     334        void useDefaultFullScreenRectangle(); 
     335 
     336        /** isFullScreen() returns true if the RenderSurface's window fills the entire screen 
    337337         * and has no border. */ 
    338338        bool isFullScreen() const { return _isFullScreen; } 
     
    347347            BackBuffer 
    348348        }; 
    349          
     349 
    350350        enum RenderToTextureMode { 
    351351            RenderToTextureMode_None, 
     
    353353            RenderToRGBATexture 
    354354        }; 
    355         
     355 
    356356        enum RenderToTextureTarget { 
    357357            Texture1D, 
     
    359359            TextureCUBE 
    360360        }; 
    361          
     361 
    362362        enum RenderToTextureOptions { 
    363363            RenderToTextureOptions_Default = 0, 
     
    365365            RequestLargestPBuffer   = 2 
    366366        }; 
    367          
     367 
    368368        enum CubeMapFace { 
    369369            PositiveX  = 0, 
     
    379379          * This method affects PBuffer surfaces only. */ 
    380380        void bindPBufferToTexture(BufferType buffer = FrontBuffer) const; 
    381          
    382         /**  
     381 
     382        /** 
    383383          * Get the render-to-texture mode (PBuffer drawables only). 
    384384          * This method has no effect if it is called after realize() */ 
    385385        RenderToTextureMode getRenderToTextureMode() const; 
    386          
     386 
    387387        /** 
    388388          * Set the render-to-texture mode (PBuffer drawables only). You 
     
    392392          * This method has no effect if it is called after realize(). */ 
    393393        void setRenderToTextureMode(RenderToTextureMode mode); 
    394          
    395         /**  
     394 
     395        /** 
    396396          * Get the render-to-texture target (PBuffer drawables only). 
    397397          * This method has no effect if it is called after realize(). */ 
    398398        RenderToTextureTarget getRenderToTextureTarget() const; 
    399          
    400         /**  
     399 
     400        /** 
    401401          * Set the render-to-texture target (PBuffer drawables only). You 
    402402          * can pass int values different from the constants defined by 
     
    405405          * This method has no effect if it is called after realize(). */ 
    406406        void setRenderToTextureTarget(RenderToTextureTarget target); 
    407          
    408         /**  
     407 
     408        /** 
    409409          * Get the render-to-texture options (PBuffer drawables only). 
    410410          * This method has no effect if it is called after realize(). */ 
    411411        RenderToTextureOptions getRenderToTextureOptions() const; 
    412          
    413         /**  
     412 
     413        /** 
    414414          * Set the render-to-texture options (PBuffer drawables only). 
    415415          * You can pass any combination of the constants defined in 
     
    417417          * This method has no effect if it is called after realize(). */ 
    418418        void setRenderToTextureOptions(RenderToTextureOptions options); 
    419          
     419 
    420420        /** 
    421421          * Get which mipmap level on the target texture will be 
     
    428428          * PBuffer has been realized. */ 
    429429        void setRenderToTextureMipMapLevel(int level); 
    430          
     430 
    431431        /** 
    432432          * Get which face on the target cube map texture will be 
     
    441441 
    442442        // END TEMPORARY PBUFFER RENDER TO TEXTURE SUPPORT 
    443          
     443 
    444444        /** 
    445445          * Get the (const) vector of user-defined PBuffer attributes. */ 
     
    479479        std::string        _hostname; 
    480480        int                _displayNum; 
    481         float              _windowLeft, _windowRight,  
     481        float              _windowLeft, _windowRight, 
    482482                           _windowBottom, _windowTop; 
    483483        int                _windowX, _windowY; 
     
    531531        GLContext          _fullscreenGlcontext; 
    532532        CFDictionaryRef    _oldDisplayMode; 
    533          
     533 
    534534        bool _captureDisplayOrWindow(); 
    535535        void _releaseDisplayOrWindow(); 
    536536#endif 
    537          
     537 
    538538        // user-defined PBuffer attributes 
    539539        std::vector<int>        _user_pbattr; 
    540          
     540 
    541541 
    542542        bool _useConfigEventThread; 
    543543        bool _checkOwnEvents; 
    544544        bool _useDefaultEsc; 
    545          
     545 
    546546        InputRectangle _inputRectangle; 
    547547 
     
    584584        BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag); 
    585585        void KillGLWindow(); 
    586          
     586 
    587587        LONG WINAPI proc( Window, UINT, WPARAM, LPARAM ); 
    588588        static LONG WINAPI s_proc( Window, UINT, WPARAM, LPARAM ); 
     
    597597public: 
    598598        EventQueue * selectInput( unsigned int mask ); 
    599          
    600         // if _parent is set, resize the window to  
     599 
     600        // if _parent is set, resize the window to 
    601601        // fill the client area of the parent 
    602602        void resizeToParent();