Wednesday, April 1, 2015

sprites - The right way to add images to Monogame/Windows


I'm starting out with MonoGame. For now, I'm only targeting Windows (desktop -- not Windows 8 specifically).


I've used a couple of XNA products in the past (raw XNA, FlatRedBall, SilverSprite), so I may have a misunderstanding about how I should add images to my content.


How do I add images to my project?



Currently, I created a new Monogame project, added a folder called "Content," and added images under there; the only caveat is that I need to set the Copy to Output Directory action to one of the Copy ones.


It seems strange, because my "raw" XNA project just last week had a Content project in it (XNA Framework Content Pipeline, according to VS2010), which compiled my images to XNB (I think). It seems like Monogame doesn't use the same content pipeline, but I'm not sure.


Edit: My question is not about "how do I get the XNA content pipeline to work with Monogame." My question is "why would I want to use the XNA content pipeline in Monogame?"


Because there are (at least) two solutions (that I see today):



  • Add the images to the Monogame project and set the Copy to Output Directory options to copy.

  • Add a XNA content pipeline project and add my images to that instead; reference it from my MOnogame project.


Which solution should I use, and why? I currently have a working version with the first option.




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...