Added TextureUnit entry to osg::TransferFunction and osgTerrain::Layer
This commit is contained in:
@@ -31,6 +31,13 @@ class OSG_EXPORT TransferFunction : public osg::Referenced
|
||||
|
||||
TransferFunction();
|
||||
|
||||
/** Set the texture unit to assign layer to if required.
|
||||
* Negative values signifies that no texture unit has been assigned. */
|
||||
void setTextureUnit(int textureUnit) { _textureUnit = textureUnit; }
|
||||
|
||||
/** Get the texture unit to assign layer to if required.*/
|
||||
int getTextureUnit() const { return _textureUnit; }
|
||||
|
||||
osg::Image* getImage() { return _image.get(); }
|
||||
const osg::Image* getImage() const { return _image.get(); }
|
||||
|
||||
@@ -45,7 +52,9 @@ class OSG_EXPORT TransferFunction : public osg::Referenced
|
||||
virtual ~TransferFunction();
|
||||
|
||||
typedef std::vector<osg::Vec4> Colors;
|
||||
Colors _colors;
|
||||
|
||||
int _textureUnit;
|
||||
Colors _colors;
|
||||
osg::ref_ptr<osg::Image> _image;
|
||||
osg::ref_ptr<osg::Texture> _texture;
|
||||
osg::ref_ptr<osg::Shader> _shader;
|
||||
|
||||
Reference in New Issue
Block a user