Browse Source

Fix wrong bitwise shift operation.
Close #2279.

Yao Wei Tjong 姚伟忠 7 years ago
parent
commit
7508b9003b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Urho3D/Urho2D/Drawable2D.h

+ 1 - 1
Source/Urho3D/Urho2D/Drawable2D.h

@@ -106,7 +106,7 @@ protected:
     virtual void UpdateSourceBatches() = 0;
 
     /// Return draw order by layer and order in layer.
-    int GetDrawOrder() const { return (layer_ << 20) + (orderInLayer_ << 10); }
+    int GetDrawOrder() const { return layer_ << 16u | orderInLayer_; }
 
     /// Layer.
     int layer_;