Introduced support for controlling mipmapping of osgTerrain::ImageLayer and compression of osgTerrain::HeightFieldLayer.
This commit is contained in:
@@ -267,7 +267,8 @@ class OSG_EXPORT GraphicsContext : public Object
|
||||
inline const Vec4& getClearColor() const { return _clearColor; }
|
||||
|
||||
/** Set the clear mask used in glClear(..).
|
||||
* Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT. */
|
||||
* Defaults to 0 - so no clear is done by default by the GraphicsContext, instead the Camera's attached the GraphicsContext will do the clear.
|
||||
* GraphicsContext::setClearMask() is useful for when the Camera's Viewports don't conver the whole context, so the context will fill in the gaps. */
|
||||
inline void setClearMask(GLbitfield mask) { _clearMask = mask; }
|
||||
|
||||
/** Get the clear mask.*/
|
||||
|
||||
@@ -77,17 +77,20 @@ class OSGTERRAIN_EXPORT Layer : public osg::Object
|
||||
void setDefaultValue(const osg::Vec4& value) { _defaultValue = value; }
|
||||
const osg::Vec4& getDefaultValue() const { return _defaultValue; }
|
||||
|
||||
enum Filter
|
||||
{
|
||||
NEAREST,
|
||||
LINEAR
|
||||
};
|
||||
|
||||
/** Set the texture filter to use when do texture associated with this layer.*/
|
||||
void setFilter(Filter filter) { _filter = filter; }
|
||||
/** Set the minification texture filter to use when do texture associated with this layer.*/
|
||||
void setMinFilter(osg::Texture::FilterMode filter) { _minFilter = filter; }
|
||||
|
||||
/** Get the minification texture filter to use when do texture associated with this layer.*/
|
||||
osg::Texture::FilterMode getMinFilter() const { return _minFilter; }
|
||||
|
||||
|
||||
/** Set the magniification texture filter to use when do texture associated with this layer.*/
|
||||
void setMagFilter(osg::Texture::FilterMode filter) { _magFilter = filter; }
|
||||
|
||||
/** Get the magnification texture filter to use when do texture associated with this layer.*/
|
||||
osg::Texture::FilterMode getMagFilter() const { return _magFilter; }
|
||||
|
||||
/** Get the texture filter to use when do texture associated with this layer.*/
|
||||
Filter getFilter() const { return _filter; }
|
||||
|
||||
|
||||
/** Return image associated with layer if supported. */
|
||||
@@ -209,7 +212,8 @@ class OSGTERRAIN_EXPORT Layer : public osg::Object
|
||||
unsigned int _maxLevel;
|
||||
osg::ref_ptr<ValidDataOperator> _validDataOperator;
|
||||
osg::Vec4 _defaultValue;
|
||||
Filter _filter;
|
||||
osg::Texture::FilterMode _minFilter;
|
||||
osg::Texture::FilterMode _magFilter;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user