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/Texture2DArray

    r12139 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*/ 
     
    2020namespace osg { 
    2121 
    22 /** Texture2DArray state class which encapsulates OpenGL 2D array texture functionality.  
     22/** Texture2DArray state class which encapsulates OpenGL 2D array texture functionality. 
    2323 * Texture arrays were introduced with Shader Model 4.0 hardware. 
    24  *  
     24 * 
    2525 * A 2D texture array does contain textures sharing the same properties (e.g. size, bitdepth,...) 
    2626 * in a layered structure. See http://www.opengl.org/registry/specs/EXT/texture_array.txt for more info. 
     
    3030 
    3131    public : 
    32          
     32 
    3333        Texture2DArray(); 
    3434 
     
    3737 
    3838        META_StateAttribute(osg, Texture2DArray, TEXTURE); 
    39          
     39 
    4040        /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ 
    4141        virtual int compare(const StateAttribute& rhs) const; 
     
    5252        virtual const Image* getImage(unsigned int layer) const; 
    5353 
    54         /** Get the number of images that are assigned to the Texture.  
     54        /** Get the number of images that are assigned to the Texture. 
    5555         * The number is equal to the texture depth. To get the maximum possible 
    5656         * image/layer count, you have to use the extension subclass, since it provides 
    5757         * graphic context dependent information. 
    5858         */ 
    59         virtual unsigned int getNumImages() const { return getTextureDepth(); }  
     59        virtual unsigned int getNumImages() const { return getTextureDepth(); } 
    6060 
    6161        /** Check how often was a certain layer in the given context modified */ 
     
    8686                virtual void subload(const Texture2DArray& texture,State& state) const = 0; 
    8787        }; 
    88          
    89          
     88 
     89 
    9090        void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } 
    91          
     91 
    9292        SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } 
    9393 
    9494        const SubloadCallback* getSubloadCallback() const { return _subloadCallback.get(); } 
    95          
    96          
     95 
     96 
    9797 
    9898        /** Set the number of mip map levels the the texture has been created with. 
     
    102102 
    103103        /** Get the number of mip map levels the the texture has been created with. */ 
    104         unsigned int getNumMipmapLevels() const { return _numMipmapLevels; }         
     104        unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } 
    105105 
    106106        /** Copies a two-dimensional texture subimage, as per 
     
    109109          * contents at position \a x, \a y with width \a width and height 
    110110          * \a height. Loads framebuffer data into the texture using offsets 
    111           * \a xoffset and \a yoffset. \a zoffset specifies the layer of the texture  
    112           * array to which the result is copied.  
     111          * \a xoffset and \a yoffset. \a zoffset specifies the layer of the texture 
     112          * array to which the result is copied. 
    113113          */ 
    114114        void copyTexSubImage2DArray(State& state, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height ); 
     
    117117        */ 
    118118        virtual void apply(State& state) const; 
    119          
     119 
    120120 
    121121        /** Extensions class which encapsulates the querying of extensions and 
    122           * associated function pointers, and provides convenience wrappers to  
     122          * associated function pointers, and provides convenience wrappers to 
    123123          * check for the extensions or use the associated functions. 
    124124        */ 
     
    129129 
    130130                Extensions(const Extensions& rhs); 
    131                  
     131 
    132132                void lowestCommonDenominator(const Extensions& rhs); 
    133                  
     133 
    134134                void setupGLExtensions(unsigned int contextID); 
    135135 
    136136                void setTexture2DArraySupported(bool flag) { _isTexture2DArraySupported=flag; } 
    137137                bool isTexture2DArraySupported() const { return _isTexture2DArraySupported; } 
    138                  
     138 
    139139                void setTexture3DSupported(bool flag) { _isTexture3DSupported=flag; } 
    140140                bool isTexture3DSupported() const { return _isTexture3DSupported; } 
     
    142142                void setMaxLayerCount(GLint count) { _maxLayerCount = count; } 
    143143                GLint maxLayerCount() const { return _maxLayerCount; } 
    144                  
     144 
    145145                void setMax2DSize(GLint size) { _max2DSize = size; } 
    146146                GLint max2DSize() const { return _max2DSize; } 
    147                  
     147 
    148148                void glTexImage3D( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) const; 
    149149 
    150150                void glTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) const; 
    151                  
     151 
    152152                void glCopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) const; 
    153                  
     153 
    154154                bool isCompressedTexImage3DSupported() const { return _glCompressedTexImage3D!=0; } 
    155155                void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) const; 
     
    161161 
    162162                ~Extensions() {} 
    163                  
     163 
    164164                bool    _isTexture2DArraySupported; 
    165165                bool    _isTexture3DSupported; 
    166                  
     166 
    167167                GLint   _maxLayerCount; 
    168168                GLint   _max2DSize; 
     
    179179                CompressedTexSubImage3DArbProc  _glCompressedTexSubImage3D; 
    180180                GLCopyTexSubImageProc           _glCopyTexSubImage3D; 
    181                  
     181 
    182182        }; 
    183          
     183 
    184184        /** Function to call to get the extension of a specified context. 
    185185          * If the Extension object for that context has not yet been created 
    186186          * and the 'createIfNotInitalized' flag been set to false then returns NULL. 
    187           * If 'createIfNotInitalized' is true then the Extensions object is  
     187          * If 'createIfNotInitalized' is true then the Extensions object is 
    188188          * automatically created. However, in this case the extension object will 
    189189          * only be created with the graphics context associated with ContextID. 
     
    201201 
    202202        virtual ~Texture2DArray(); 
    203          
     203 
    204204        bool imagesValid() const; 
    205          
     205 
    206206        virtual void computeInternalFormat() const; 
    207207        void allocateMipmap(State& state) const; 
     
    216216        // subloaded images can have different texture and image sizes. 
    217217        mutable GLsizei _textureWidth, _textureHeight, _textureDepth; 
    218          
    219         // number of mip map levels the the texture has been created with,         
     218 
     219        // number of mip map levels the the texture has been created with, 
    220220        mutable GLsizei _numMipmapLevels; 
    221221