Changeset 13041 for OpenSceneGraph/trunk/include/osg/Multisample
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/Multisample (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/Multisample
r11808 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 */ … … 46 46 enum Mode 47 47 { 48 FASTEST = GL_FASTEST, 48 FASTEST = GL_FASTEST, 49 49 NICEST = GL_NICEST, 50 DONT_CARE = GL_DONT_CARE 50 DONT_CARE = GL_DONT_CARE 51 51 }; 52 52 53 53 Multisample(); 54 54 55 55 /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ 56 56 Multisample(const Multisample& trans,const CopyOp& copyop=CopyOp::SHALLOW_COPY): … … 61 61 62 62 META_StateAttribute(osg, Multisample,MULTISAMPLE); 63 63 64 64 /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ 65 65 virtual int compare(const StateAttribute& sa) const … … 77 77 } 78 78 79 void setSampleCoverage(float coverage, bool invert) 79 void setSampleCoverage(float coverage, bool invert) 80 80 { 81 _coverage = coverage; 81 _coverage = coverage; 82 82 _invert = invert; 83 83 } 84 84 inline void setCoverage(float coverage) { _coverage=coverage; } 85 85 inline float getCoverage() const { return _coverage; } 86 86 87 87 inline void setInvert(bool invert) { _invert=invert; } 88 88 inline bool getInvert() const { return _invert; } … … 95 95 96 96 /** Extensions class which encapsulates the querying of extensions and 97 * associated function pointers, and provide convenience wrappers to 98 * check for the extensions or use the associated functions.*/ 97 * associated function pointers, and provide convenience wrappers to 98 * check for the extensions or use the associated functions.*/ 99 99 class OSG_EXPORT Extensions : public osg::Referenced 100 100 { … … 103 103 104 104 Extensions(const Extensions& rhs); 105 105 106 106 void lowestCommonDenominator(const Extensions& rhs); 107 107 108 108 void setupGLExtensions(unsigned int contextID); 109 109 … … 112 112 bool isMultisampleSupported() const { return _isMultisampleSupported; } 113 113 bool isMultisampleFilterHintSupported() const { return _isMultisampleFilterHintSupported; } 114 114 115 115 void glSampleCoverage(GLclampf value, GLboolean invert) const; 116 116 … … 118 118 119 119 ~Extensions() {} 120 120 121 121 bool _isMultisampleSupported; 122 122 bool _isMultisampleFilterHintSupported; 123 123 124 124 typedef void (GL_APIENTRY * GLSampleCoverageProc) (GLclampf value, GLboolean invert); 125 125 GLSampleCoverageProc _glSampleCoverage; 126 126 127 127 }; 128 128 129 129 /** Function to call to get the extension of a specified context. 130 * If the Extension object for that context has not yet been created 130 * If the Extension object for that context has not yet been created 131 131 * and the 'createIfNotInitalized' flag been set to false then returns NULL. 132 * If 'createIfNotInitalized' is true then the Extensions object is 132 * If 'createIfNotInitalized' is true then the Extensions object is 133 133 * automatically created. However, in this case the extension object will 134 134 * only be created with the graphics context associated with ContextID..*/
