I can not load MGFXO!

Hi,

I try to port my XNA game (Xbox 360) to Ouya MonoGame and I have some problems with my Fx files…

I converted my Fx files to Mgfxo with 2MGFX.exe without errors, but I can not load mgfxo :

Microsoft.Xna.Framework.Content.ContentLoadException: Could not load Effets/CelShading.mgfxo asset as a non-content file! —> System.Exception: Opening stream error. —> System.Exception: Content/Effets/CelShading.mgfxo.xnb

or

Microsoft.Xna.Framework.Content.ContentLoadException: Could not load Effets/CelShading asset as a non-content file! —> System.Exception: Opening stream error. —> System.Exception: Content/Effets/CelShading.xnb

It supports only xnb ?

Thank you in advance and sorry for my English.

You’re getting confused with what tool to use here. There are two paths:

  1. Run your FX thru 2MGFX, load it directly and pass the byte[] to the Effect constructor.
  2. Run your FX thru the MonoGame Pipeline Tool, it generates an XNB, load it via ContentManager.

These are different paths… you can’t mix them. See the docs for some more details…

http://www.monogame.net/documentation/?page=Custom_Effects
http://www.monogame.net/documentation/?page=Using_The_Pipeline_Tool

Thank you very much for your response,

I was really stuck.