Changeset 13041 for OpenSceneGraph/trunk/include/osg/Texture3D
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/Texture3D (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/Texture3D
r11830 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 */ … … 30 30 31 31 public : 32 32 33 33 Texture3D(); 34 34 … … 37 37 /** Copy constructor using CopyOp to manage deep vs shallow copy. */ 38 38 Texture3D(const Texture3D& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY); 39 39 40 40 META_StateAttribute(osg, Texture3D,TEXTURE); 41 41 … … 106 106 virtual void subload(const Texture3D& texture,State& state) const = 0; 107 107 }; 108 108 109 109 void setSubloadCallback(SubloadCallback* cb) { _subloadCallback = cb;; } 110 110 111 111 SubloadCallback* getSubloadCallback() { return _subloadCallback.get(); } 112 112 … … 121 121 /** Gets the number of mipmap levels created. */ 122 122 unsigned int getNumMipmapLevels() const { return _numMipmapLevels; } 123 123 124 124 125 125 /** Copies a two-dimensional texture subimage, as per … … 136 136 * compiled, create the texture mipmap levels. */ 137 137 virtual void apply(State& state) const; 138 138 139 139 140 140 /** Encapsulates queries of extension availability, obtains extension 141 141 * function pointers, and provides convenience wrappers for 142 * calling extension functions. */ 142 * calling extension functions. */ 143 143 class OSG_EXPORT Extensions : public osg::Referenced 144 144 { … … 147 147 148 148 Extensions(const Extensions& rhs); 149 149 150 150 void lowestCommonDenominator(const Extensions& rhs); 151 151 152 152 void setupGLExtensions(unsigned int contextID); 153 153 154 154 void setTexture3DSupported(bool flag) { _isTexture3DSupported=flag; } 155 155 bool isTexture3DSupported() const { return _isTexture3DSupported; } 156 156 157 157 void setTexture3DFast(bool flag) { _isTexture3DFast=flag; } 158 158 bool isTexture3DFast() const { return _isTexture3DFast; } … … 185 185 GLint _maxTexture3DSize; 186 186 }; 187 187 188 188 /** Encapsulates queries of extension availability, obtains extension 189 189 * function pointers, and provides convenience wrappers for 190 * calling extension functions. */ 190 * calling extension functions. */ 191 191 static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized); 192 192 … … 215 215 /** Subloaded images can have different texture and image sizes. */ 216 216 mutable GLsizei _textureWidth, _textureHeight, _textureDepth; 217 217 218 218 /** Number of mip map levels the the texture has been created with, */ 219 219 mutable GLsizei _numMipmapLevels;
