randomPoison / gunship-rs

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

Decouple Polygon From OpenGL #49

Closed randomPoison closed 8 years ago

randomPoison commented 8 years ago

Currently polygon is pretty tightly coupled with OpenGL. In terms of polygon's internals this is acceptable for the time being, however the abstraction is leaking beyond polygon into other parts of the engine (e.g. the resource manager directly handles GLMeshDatas :/ ). At the very least we need to no longer export GLMeshData from polygon and allow it to provide a backend-agnostic mesh handle type. At the same time it would be good to also refactor the internals of polygon so that it's more ready for handling other rendering backends.

randomPoison commented 8 years ago

Most of the work for this has been completed on the render-reform branch. The only remaining issue is that there is no way to write shaders in a backend-independent way. I think the ultimate solution to this will be to create a custom shading language for Rust and write a compiler than can generate shaders for the different backends, but that's going to be a large task for a later date.