randomPoison / gunship-rs

An experimental game engine written in Rust.
MIT License
27 stars 3 forks source link

Decouple Collada Parsing From Resource Manager #42

Closed randomPoison closed 8 years ago

randomPoison commented 8 years ago

Currently the resource manager is hard-coded to look for meshes as COLLADA files. This is less than idea for various reasons:

In the long term I'd like to completely move the COLLADA processing code out of gunship-core, but for now it's enough to build up a layer of abstraction between the resource manager and the COLLADA processing layer. Conceptually I'd like to break it down such that when the game layer specifies that a file to load the resource manager checks the extension and if it's ".dae" it sends the file over to the COLLADA processor. The processing layer should then spit out a set of Mesh objects with the associated URI that can be used to identify the mesh and associate it with entities in the scene.

Ideally when this is done the COLLADA-related code should be completely compartmentalized and the resource manager should know nothing about COLLADA beyond its file extension so that it can pass the appropriate files to the processing layer. This will make it so that later on this layer can be pulled out into a separate library that can be used to pre-process the COLLADA files and spit out mesh files that the resource manager can use directly, though that is outside the scope of this issue.