libgdx/libgdx — pull request #2210 by jrenner (2014-08-06 08:16:42+00:00)
Title: Headless model

This PR adds some modified versions of the Model class and associated classes.
They are identical to the regular classes except they ignore anything related to Textures, Materials and VBOs to avoid exceptions.

Their reason for existence is because a headless app cannot load Models or Textures since it has no gl context. However, there are times when the headless app needs to load the models for access to its data. For example, my use case is using Bullet to create btBvhTriangleMesh collision shapes. These shapes take an array of MeshParts as an argument to construct the shape. Usually, one loads a Model and passes model.meshParts.

I didn't feel good about the copy+paste job, but I didn't see a more elegant solution, since it would have meant hacking up the Model class itself.

I realize there's a good chance we won't want this in libgdx, but on the other hand I want to put it up for consideration since having a headless server that uses bullet physics seems like a resonable thing to support.