Commit 67588b82 authored by Jan Möbius's avatar Jan Möbius

Copy Constructors for Texture data perObjectDatas

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9548 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bc97bae0
......@@ -95,6 +95,26 @@ class TexParameters
class Texture {
public :
Texture();
// copy constructor
Texture( const Texture& _tex)
: parameters(_tex.parameters),
multiTextureList(_tex.multiTextureList),
name_(_tex.name_),
visibleName_(_tex.visibleName_),
filename_(_tex.filename_),
id_(_tex.id_),
glName_(_tex.glName_),
dimension_(_tex.dimension_),
enabled_(_tex.enabled_),
hidden_(_tex.hidden_),
dirty_(_tex.dirty_),
type_(_tex.type_),
indexMappingProperty_(_tex.indexMappingProperty_)
{
// copy QImage ( we need a deep copy! )
textureImage = _tex.textureImage.copy(_tex.textureImage.rect());
}
void filename( QString _name ) { filename_ = _name; };
......@@ -199,6 +219,15 @@ class TextureData : public PerObjectData
TextureData();
/// Destructor
~TextureData();
// copy Operator returning an exact copy of this Object
virtual PerObjectData* copyPerObjectData( ) {
// Create an object copy (This will call all copy constructors of the included data objects! )
TextureData* copy = new TextureData(*this);
return copy;
}
/// Check if a texture exists
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment