Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the possible compiler directives for MonoGame?

For example, XNA contained directives for WINDOWS, XBOX/XBOX360, and WINDOWS_PHONE.

I've also seen DIRECTX and OPENGL, but when would you need to leverage those?


Supported Platforms:

  • PC
  • Windows 8 Store App
  • Linux
  • Android
  • OUYA
  • Mac
  • iOS
  • Playstation Mobile
share|improve this question
up vote 3 down vote accepted

If you look inside each project file on github you can see the constants defined for each platform. I've extracted them here:

  • Android - TRACE;ANDROID;GLES;OPENGL
  • Linux - LINUX;OPENGL
  • MacOS - MONOMAC;OPENGL
  • Ouya - TRACE;ANDROID;GLES;OPENGL;OUYA
  • PSMobile - DEBUG;PSM
  • Windows - DEBUG;TRACE;WINDOWS;DIRECTX;WINDOWS_MEDIA_SESSION
  • Windows8 - TRACE;NETFX_CORE;WINRT;WINDOWS_STOREAPP;DIRECTX;DIRECTX11_1;WINDOWS_MEDIA_ENGINE
  • WindowsGL - TRACE;WINDOWS;OPENGL
  • WindowsPhone - TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE;WINRT;DIRECTX
  • iOS - IOS;GLES;OPENGL
share|improve this answer
    
I never knew those were stored in the project files. They hold all kinds of goodies! – JimmyBoh May 17 '13 at 14:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.