title: Texture rendering order in LibGDX
body: <p>I am porting a game from iOS and Windows Phone to Android.  Most of the code I am following though for the port is from the Windows Phone version, just because that is most similar to Java.  My question relates to the OrthographicCamera class in LibGDX.</p>
  
  <p>I am using the Game Object as Component container method for this game.  This can be read about here: <a href="http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" rel="nofollow">http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/</a>  just so you have an idea what I am talking about.  So, pretty much everything in the game extends the Component component class.  And each game object i.e. a ball is a GameObject which constists of Components, i.e. Sprite, RigidBody (which is for the physics), Transform2 (position, rotation, etc.)  This includes the Camera2 class, which is just wrapping an OrthographicCamera member.  </p>
  
  <p>I have two issues, and I have research it to no end.  I cannot figure out how to do layering.  The game has a drawer, that the user can swipe down to drag open.  This should be on top of anything else in the game.  The way that the guy who developed the XNA version accomplished this was by having multiple SpriteBatches and essentially treated each SpriteBatch as a layer.  This doesn't work in LibGDX, and it's bad practice to use multiple SpriteBatches.  The issue is, the game objects are organized as a tree, and they are rendered according to the traversal of the tree, so ordering ends up being based on when the object was inserted into the tree.  I have looked into DecalBatch so that I could use a Z ordering, but it would require allot of refactoring as the game is very nearly done.  As I said I tried using multiple SpriteBatches but for whatever reason this doesn't work either.  </p>
  
  <p>As this is already a long post, I will ask my second issue in a separate post.</p>