Cleaned up per context buffers support
This commit is contained in:
@@ -168,8 +168,8 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
|
||||
bool getAccumBuffer() const { return (_minimumNumberAccumRedBits+_minimumNumberAccumGreenBits+_minimumNumberAccumBlueBits+_minimumNumberAccumAlphaBits)!=0; }
|
||||
|
||||
|
||||
void setMaxNumberOfGraphicsContexts(unsigned int num) { _maxNumOfGraphicsContexts = num; }
|
||||
unsigned int getMaxNumberOfGraphicsContexts() const { return _maxNumOfGraphicsContexts; }
|
||||
void setMaxNumberOfGraphicsContexts(unsigned int num);
|
||||
unsigned int getMaxNumberOfGraphicsContexts() const;
|
||||
|
||||
void setNumMultiSamples(unsigned int samples) { _numMultiSamples = samples; }
|
||||
unsigned int getNumMultiSamples() const { return _numMultiSamples; }
|
||||
|
||||
@@ -719,7 +719,7 @@ class OSG_EXPORT Texture : public osg::StateAttribute
|
||||
};
|
||||
|
||||
typedef std::list< ref_ptr<TextureObject> > TextureObjectList;
|
||||
typedef std::map<unsigned int, TextureObjectList > TextureObjectListMap;
|
||||
typedef osg::buffered_object<TextureObjectList> TextureObjectListMap;
|
||||
|
||||
/** Takes the active texture objects from the Texture and places them
|
||||
* in the specified TextureObjectListMap. */
|
||||
|
||||
@@ -31,6 +31,10 @@ class buffered_value
|
||||
_array(DisplaySettings::instance()->getMaxNumberOfGraphicsContexts(),0)
|
||||
{}
|
||||
|
||||
inline buffered_value(unsigned int size):
|
||||
_array(size,0)
|
||||
{}
|
||||
|
||||
buffered_value& operator = (const buffered_value& rhs)
|
||||
{
|
||||
_array = rhs._array;
|
||||
@@ -77,6 +81,10 @@ class buffered_object
|
||||
_array(DisplaySettings::instance()->getMaxNumberOfGraphicsContexts())
|
||||
{}
|
||||
|
||||
inline buffered_object(unsigned int size):
|
||||
_array(size)
|
||||
{}
|
||||
|
||||
buffered_object& operator = (const buffered_object& rhs)
|
||||
{
|
||||
_array = rhs._array;
|
||||
|
||||
Reference in New Issue
Block a user