MindBuffer / cohen_gig

Wash lighting and LED visualisation and DMX control for the upcoming Josh Cohen gig.
3 stars 1 forks source link

Introduce a cargo workspace and shader crates for hotloading #3

Closed mitchmindtree closed 5 years ago

mitchmindtree commented 5 years ago

The original src and Cargo.toml have been moved into the inner cohen_gig crate - all of that code is still there.

The shader function has been moved into the shader crate, which just contains a single lib crate with a dylib target. This crate is targeted by the hotloader, so that while running the cohen_gig exe, if anything changes within the shader/src/ directory, the shader crate will be re-built and a pointer to the newly loaded function will be available to the cohen_gig exe.

The shader_shared crate is for items shared between the cohen_gig crate and the shader crate. This is important so that we can guarantee the types have the same layout between the exe and the dynamically loaded dylib. Currently, this only contains the Uniforms struct.

Also removes the Cargo.lock from git tracking so we can avoid annoying git conflicts.

Related TODO

JoshuaBatty commented 5 years ago

Awesome stuff nice work man, looking forward to checking this out. Acie and I are going to the global climate strike today but will spend the weekend getting into this.