Added Texture1D(Image*) and Texture3D(Image*) constructors
This commit is contained in:
parent
a4aa8fbcd2
commit
5e95d6e3b5
@ -30,6 +30,8 @@ class OSG_EXPORT Texture1D : public Texture
|
||||
|
||||
Texture1D();
|
||||
|
||||
Texture1D(Image* image);
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy. */
|
||||
Texture1D(const Texture1D& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
@ -32,6 +32,8 @@ class OSG_EXPORT Texture3D : public Texture
|
||||
|
||||
Texture3D();
|
||||
|
||||
Texture3D(Image* image);
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy. */
|
||||
Texture3D(const Texture3D& text,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
@ -26,6 +26,13 @@ Texture1D::Texture1D():
|
||||
{
|
||||
}
|
||||
|
||||
Texture1D::Texture1D(osg::Image* image):
|
||||
_textureWidth(0),
|
||||
_numMipmapLevels(0)
|
||||
{
|
||||
setImage(image);
|
||||
}
|
||||
|
||||
Texture1D::Texture1D(const Texture1D& text,const CopyOp& copyop):
|
||||
Texture(text,copyop),
|
||||
_image(copyop(text._image.get())),
|
||||
|
@ -31,6 +31,16 @@ Texture3D::Texture3D():
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Texture3D::Texture3D(Image* image):
|
||||
_textureWidth(0),
|
||||
_textureHeight(0),
|
||||
_textureDepth(0),
|
||||
_numMipmapLevels(0)
|
||||
{
|
||||
setImage(image);
|
||||
}
|
||||
|
||||
Texture3D::Texture3D(const Texture3D& text,const CopyOp& copyop):
|
||||
Texture(text,copyop),
|
||||
_image(copyop(text._image.get())),
|
||||
|
Loading…
Reference in New Issue
Block a user