Browse Source

Add URHO3D_API specifier to SourceBatch struct.

Lasse Öörni 10 years ago
parent
commit
222cb27a74
2 changed files with 24 additions and 1 deletions
  1. 18 0
      Source/Urho3D/Graphics/Drawable.cpp
  2. 6 1
      Source/Urho3D/Graphics/Drawable.h

+ 18 - 0
Source/Urho3D/Graphics/Drawable.cpp

@@ -56,10 +56,28 @@ SourceBatch::SourceBatch() :
 {
 {
 }
 }
 
 
+SourceBatch::SourceBatch(const SourceBatch& batch)
+{
+    *this = batch;
+}
+
 SourceBatch::~SourceBatch()
 SourceBatch::~SourceBatch()
 {
 {
 }
 }
 
 
+SourceBatch& SourceBatch::operator =(const SourceBatch& rhs)
+{
+    distance_ = rhs.distance_;
+    geometry_ = rhs.geometry_;
+    material_ = rhs.material_;
+    worldTransform_ = rhs.worldTransform_;
+    numWorldTransforms_ = rhs.numWorldTransforms_;
+    geometryType_ = rhs.geometryType_;
+
+    return *this;
+}
+
+
 Drawable::Drawable(Context* context, unsigned char drawableFlags) :
 Drawable::Drawable(Context* context, unsigned char drawableFlags) :
     Component(context),
     Component(context),
     drawableFlags_(drawableFlags),
     drawableFlags_(drawableFlags),

+ 6 - 1
Source/Urho3D/Graphics/Drawable.h

@@ -75,13 +75,18 @@ struct FrameInfo
 };
 };
 
 
 /// Source data for a 3D geometry draw call.
 /// Source data for a 3D geometry draw call.
-struct SourceBatch
+struct URHO3D_API SourceBatch
 {
 {
     /// Construct with defaults.
     /// Construct with defaults.
     SourceBatch();
     SourceBatch();
+    /// Copy-construct.
+    SourceBatch(const SourceBatch& batch);
     /// Destruct.
     /// Destruct.
     ~SourceBatch();
     ~SourceBatch();
 
 
+    /// Assignment operator.
+    SourceBatch& operator =(const SourceBatch& rhs);
+
     /// Distance from camera.
     /// Distance from camera.
     float distance_;
     float distance_;
     /// Geometry.
     /// Geometry.