Wrong code sample on MonoGame Effects Compiler page
Closed this issue · 1 comments
titanix commented
At the end of page https://docs.monogame.net/articles/getting_started/tools/mgfxc.html there is the following code sample:
byte[] bytecode = File.ReadAllBytes("mycompiled.mgfx"); var effect = new Effect(bytecode);
It's is not working has the Effect class has no such constructor. The closest available constructor is Effect(GraphicsDevice graphicsDevice, byte[] effectCode).
ThomasFOG commented
It should indeed be var effect = new Effect(graphicsDevice, bytecode);, good catch.