From Farshid Lashkari, "The following patch adds a multisample option to the

osg::DisplaySettings class. OsgCameraGroup will now read the setting
from the DisplaySettings instead of hardcoding the value. I added the
following commandline option to be able to set the multisample value:

--samples <num>

One thing to note, OsgCameraGroup would previously check if the
computer is an SGI and set multisample to 4. I retained this check in
DisplaySettings to be backwards compatible."
This commit is contained in:
Robert Osfield
2006-03-13 21:29:17 +00:00
parent d50f2e3add
commit 2b61cf0a1e
4 changed files with 36 additions and 10 deletions

View File

@@ -171,6 +171,9 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
void setMaxNumberOfGraphicsContexts(unsigned int num) { _maxNumOfGraphicsContexts = num; }
unsigned int getMaxNumberOfGraphicsContexts() const { return _maxNumOfGraphicsContexts; }
void setNumMultiSamples(unsigned int samples) { _numMultiSamples = samples; }
unsigned int getNumMultiSamples() const { return _numMultiSamples; }
bool getMultiSamples() const { return _numMultiSamples!=0; }
protected:
@@ -202,6 +205,8 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
unsigned int _minimumNumberAccumAlphaBits;
unsigned int _maxNumOfGraphicsContexts;
unsigned int _numMultiSamples;
};