Changeset 13041 for OpenSceneGraph/trunk/include/osg/TextureCubeMap
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/TextureCubeMap (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/TextureCubeMap
r11834 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 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 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * 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 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 25 25 26 26 public : 27 27 28 28 TextureCubeMap(); 29 29 … … 32 32 33 33 META_StateAttribute(osg, TextureCubeMap,TEXTURE); 34 34 35 35 /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ 36 36 virtual int compare(const StateAttribute& rhs) const; … … 87 87 virtual void subload(const TextureCubeMap& texture,State& state) const = 0; 88 88 }; 89 89 90 90 void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } 91 91 92 92 SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } 93 93 … … 101 101 102 102 /** Get the number of mip map levels the the texture has been created with. */ 103 unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } 103 unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } 104 104 105 105 /** Copies a two-dimensional texture subimage, as per … … 117 117 */ 118 118 virtual void apply(State& state) const; 119 119 120 120 121 121 /** 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 123 123 * check for the extensions or use the associated functions. 124 124 */ … … 129 129 130 130 Extensions(const Extensions& rhs); 131 131 132 132 void lowestCommonDenominator(const Extensions& rhs); 133 133 134 134 void setupGLExtensions(unsigned int contextID); 135 135 … … 140 140 141 141 ~Extensions() {} 142 142 143 143 bool _isCubeMapSupported; 144 144 145 145 }; 146 146 147 147 /** Function to call to get the extension of a specified context. 148 148 * If the Extensions object for that context has not yet been created 149 149 * and the 'createIfNotInitalized' flag been set to false then returns NULL. 150 * If 'createIfNotInitalized' is true then the Extensions object is 150 * If 'createIfNotInitalized' is true then the Extensions object is 151 151 * automatically created. However, in this case the extension object will 152 152 * only be created with the graphics context associated with ContextID. … … 164 164 165 165 virtual ~TextureCubeMap(); 166 166 167 167 bool imagesValid() const; 168 168 169 169 virtual void computeInternalFormat() const; 170 170 void allocateMipmap(State& state) const; … … 174 174 // subloaded images can have different texture and image sizes. 175 175 mutable GLsizei _textureWidth, _textureHeight; 176 177 // number of mip map levels the the texture has been created with, 176 177 // number of mip map levels the the texture has been created with, 178 178 mutable GLsizei _numMipmapLevels; 179 179
