MonoGame / MonoGame

One framework for creating powerful cross-platform games.
http://www.monogame.net
Other
11.55k stars 2.93k forks source link

Thoughts on using CppNet #8411

Open mrhelmut opened 4 months ago

mrhelmut commented 4 months ago

MonoGame.Effect.Compiler makes use of CppNet to add C-like preprocessor syntax features to shaders written for MonoGame.

This is, for instance, used to manage different platforms/shading languages in stock effects by using macros and defines (and is really handy on consoles).

Problem: MonoGame uses a pre-built C# assembly stored in the dependencies repository, which we would like to retire. We would also like to have dependencies to be self-building from source.

Should we just link to the CppNet source like we are doing for StbImageSharp and StbImageWriteSharp?

tomspilman commented 4 months ago

Should we just link to the CppNet source like we are doing for StbImageSharp and StbImageWriteSharp?

That may be best for now.

Next iteration of MG we will likely rework the effect compiler to support more shader stages which may require a bigger overhaul of how shader compiling is done. In that step we may remove CppNet in the future.