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

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/Texture

    r12306 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    7373 
    7474#ifndef GL_OES_compressed_ETC1_RGB8_texture 
    75     #define GL_ETC1_RGB8_OES                            0x8D64    
     75    #define GL_ETC1_RGB8_OES                            0x8D64 
    7676#endif 
    7777 
     
    165165 
    166166#ifndef GL_CLAMP 
    167     #define GL_CLAMP                          0x2900   
     167    #define GL_CLAMP                          0x2900 
    168168#endif 
    169169 
     
    327327        /** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/ 
    328328        virtual Texture* asTexture() { return this; } 
    329          
     329 
    330330        /** Fast alternative to dynamic_cast<> for determining if state attribute is a Texture.*/ 
    331331        virtual const Texture* asTexture() const { return this; } 
     
    377377        /** Sets the border width. */ 
    378378        void setBorderWidth(GLint width) { _borderWidth = width; dirtyTextureParameters(); } 
    379          
     379 
    380380        GLint getBorderWidth() const { return _borderWidth; } 
    381381 
     
    407407          * depends on the graphics system. */ 
    408408        void setMaxAnisotropy(float anis); 
    409          
     409 
    410410        /** Gets the maximum anisotropy value. */ 
    411411        inline float getMaxAnisotropy() const { return _maxAnisotropy; } 
     
    422422          * Texture, apply() will delete the image data. */ 
    423423        inline void setUnRefImageDataAfterApply(bool flag) { _unrefImageDataAfterApply = flag; } 
    424          
     424 
    425425        /** Gets whether or not apply() unreferences image data. */ 
    426426        inline bool getUnRefImageDataAfterApply() const { return _unrefImageDataAfterApply; } 
     
    435435        inline bool getClientStorageHint() const { return _clientStorageHint; } 
    436436 
    437         /** Sets whether to force the texture to resize images that have dimensions  
     437        /** Sets whether to force the texture to resize images that have dimensions 
    438438          * that are not a power of two. If enabled, NPOT images will be resized, 
    439439          * whether or not NPOT textures are supported by the hardware. If disabled, 
     
    482482        /** Gets the internal texture format. */ 
    483483        inline GLint getInternalFormat() const { if (_internalFormat==0) computeInternalFormat(); return _internalFormat; } 
    484          
     484 
    485485        /** Return true if the internal format is one of the compressed formats.*/ 
    486486        bool isCompressedInternalFormat() const; 
     
    513513            UNSIGNED_INTEGER = 0x4 
    514514        }; 
    515          
     515 
    516516        /** Get the internal texture format type. */ 
    517517        inline InternalFormatType getInternalFormatType() const { return _internalFormatType; } 
    518          
     518 
    519519        class TextureObject; 
    520520 
     
    564564        void setShadowComparison(bool flag) { _use_shadow_comparison = flag; } 
    565565        bool getShadowComparison() const { return _use_shadow_comparison; } 
    566          
     566 
    567567        enum ShadowCompareFunc { 
    568568            NEVER = GL_NEVER, 
     
    594594        void setShadowAmbient(float shadow_ambient) { _shadow_ambient = shadow_ambient; } 
    595595        float getShadowAmbient() const { return _shadow_ambient; } 
    596          
     596 
    597597 
    598598        /** Sets the texture image for the specified face. */ 
     
    634634        /** Encapsulates queries of extension availability, obtains extension 
    635635          * function pointers, and provides convenience wrappers for 
    636           * calling extension functions. */         
     636          * calling extension functions. */ 
    637637        class OSG_EXPORT Extensions : public osg::Referenced 
    638638        { 
     
    645645                void setTextureFilterAnisotropicSupported(bool flag) { _isTextureFilterAnisotropicSupported=flag; } 
    646646                bool isTextureFilterAnisotropicSupported() const { return _isTextureFilterAnisotropicSupported; } 
    647                  
     647 
    648648                void setTextureCompressionARBSupported(bool flag) { _isTextureCompressionARBSupported=flag; } 
    649649                bool isTextureCompressionARBSupported() const { return _isTextureCompressionARBSupported; } 
     
    654654                void setTextureCompressionPVRTC2BPPSupported(bool flag) { _isTextureCompressionPVRTC2BPPSupported=flag; } 
    655655                bool isTextureCompressionPVRTC2BPPSupported() const { return _isTextureCompressionPVRTC2BPPSupported; } 
    656                  
     656 
    657657                void setTextureCompressionPVRTC4BPPSupported(bool flag) { _isTextureCompressionPVRTC4BPPSupported=flag; } 
    658658                bool isTextureCompressionPVRTC4BPPSupported() const { return _isTextureCompressionPVRTC4BPPSupported; } 
    659                  
     659 
    660660                void setTextureCompressionETCSupported(bool flag) { _isTextureCompressionETCSupported=flag; } 
    661661                bool isTextureCompressionETCSupported() const { return _isTextureCompressionETCSupported; } 
     
    699699                bool isCompressedTexImage2DSupported() const { return _glCompressedTexImage2D!=0; } 
    700700                bool isCompressedTexSubImage2DSupported() const { return _glCompressedTexSubImage2D!=0; } 
    701                  
     701 
    702702                bool isClientStorageSupported() const { return _isClientStorageSupported; } 
    703703 
    704704                bool isNonPowerOfTwoTextureSupported(GLenum filter) const 
    705705                { 
    706                     return (filter==GL_LINEAR || filter==GL_NEAREST) ?  
     706                    return (filter==GL_LINEAR || filter==GL_NEAREST) ? 
    707707                            _isNonPowerOfTwoTextureNonMipMappedSupported : 
    708708                            _isNonPowerOfTwoTextureMipMappedSupported; 
     
    745745 
    746746                ~Extensions() {} 
    747                  
     747 
    748748                typedef void (GL_APIENTRY * CompressedTexImage2DArbProc) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); 
    749749                typedef void (GL_APIENTRY * CompressedTexSubImage2DArbProc) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); 
     
    786786                GLint   _numTextureUnits; 
    787787        }; 
    788          
     788 
    789789        /** Gets the extension for the specified context. Creates the 
    790790          * Extensions object for that context if it doesn't exist. 
     
    801801          * image format. */ 
    802802        static bool isCompressedInternalFormat(GLint internalFormat); 
    803          
     803 
    804804        /** Determine the size of a compressed image, given the internalFormat, 
    805805          * the width, the height, and the depth of the image. The block size 
     
    812812          * you're implementing a subload callback. */ 
    813813        void applyTexImage2D_load(State& state, GLenum target, const Image* image, GLsizei width, GLsizei height,GLsizei numMipmapLevels) const; 
    814          
     814 
    815815        /** Helper method. Subloads images into the texture, but doesn't set 
    816816          * or use a texture binding. Note: Don't call this method directly 
     
    833833 
    834834        virtual void computeInternalFormat() const = 0; 
    835          
     835 
    836836        /** Computes the internal format from Image parameters. */ 
    837837        void computeInternalFormatWithImage(const osg::Image& image) const; 
     
    839839        /** Computes the texture dimension for the given Image. */ 
    840840        void computeRequiredTextureDimensions(State& state, const osg::Image& image,GLsizei& width, GLsizei& height,GLsizei& numMipmapLevels) const; 
    841          
     841 
    842842        /** Computes the internal format type. */ 
    843843        void computeInternalFormatType() const;