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
Currently the hotloading is buggy on my linux lappy. I think this
might be due to an error in the version of notify the new hotlib
crate is using - I'll try rolling it back to the same version as the
one shade_runner uses as shade_runner seems to be more consistent.
I need to update the hotlib crate so that it provides some sort of
feedback during compilation. Right now it just blocks the program and
its tricky to tell whether or not the hotloader has crashed or its
still compiling lol. Once I do this, I'll add some GUI feedback so we
can see progress, and I'll stop it from blocking the application.
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.
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 theshader
crate, which just contains a single lib crate with a dylib target. This crate is targeted by the hotloader, so that while running thecohen_gig
exe, if anything changes within theshader/src/
directory, theshader
crate will be re-built and a pointer to the newly loaded function will be available to thecohen_gig
exe.The
shader_shared
crate is for items shared between thecohen_gig
crate and theshader
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 theUniforms
struct.Also removes the Cargo.lock from git tracking so we can avoid annoying git conflicts.
Related TODO
notify
the newhotlib
crate is using - I'll try rolling it back to the same version as the one shade_runner uses as shade_runner seems to be more consistent.hotlib
crate so that it provides some sort of feedback during compilation. Right now it just blocks the program and its tricky to tell whether or not the hotloader has crashed or its still compiling lol. Once I do this, I'll add some GUI feedback so we can see progress, and I'll stop it from blocking the application.