(ded4a3e0a) v0.9.0.7

This commit is contained in:
Joonas Rikkonen
2019-06-25 16:00:44 +03:00
parent e5ae622c77
commit 4a51db77b5
1777 changed files with 421528 additions and 917 deletions
@@ -52,10 +52,10 @@ namespace Facepunch.Steamworks
Address = Utility.Int32ToIp( item.NetAdr.IP ),
ConnectionPort = item.NetAdr.ConnectionPort,
QueryPort = item.NetAdr.QueryPort,
Name = item.ServerName,
Name = Encoding.UTF8.GetString(item.ServerName),
Ping = item.Ping,
GameDir = item.GameDir,
Map = item.Map,
Map = Encoding.UTF8.GetString(item.Map),
Description = item.GameDescription,
AppId = item.AppID,
Players = item.Players,
@@ -191,13 +191,13 @@ namespace SteamNative
bool /*bool*/ ISteamGameServer_WasRestartRequested();
void /*void*/ ISteamGameServer_SetMaxPlayerCount( int /*int*/ cPlayersMax );
void /*void*/ ISteamGameServer_SetBotPlayerCount( int /*int*/ cBotplayers );
void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName );
void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName );
void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName );
void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName );
void /*void*/ ISteamGameServer_SetPasswordProtected( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
void /*void*/ ISteamGameServer_SetSpectatorPort( ushort /*uint16*/ unSpectatorPort );
void /*void*/ ISteamGameServer_SetSpectatorServerName( string /*const char **/ pszSpectatorServerName );
void /*void*/ ISteamGameServer_ClearAllKeyValues();
void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue );
void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
void /*void*/ ISteamGameServer_SetGameTags( string /*const char **/ pchGameTags );
void /*void*/ ISteamGameServer_SetGameData( string /*const char **/ pchGameData );
void /*void*/ ISteamGameServer_SetRegion( string /*const char **/ pszRegion );
@@ -3951,13 +3951,13 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
}
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
}
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -3987,7 +3987,7 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
}
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -4992,13 +4992,13 @@ namespace SteamNative
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
[DllImport( "libsteam_api.so", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
@@ -3951,13 +3951,13 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
}
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
}
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -3987,7 +3987,7 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
}
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -4992,13 +4992,13 @@ namespace SteamNative
[DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
[DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
@@ -3951,13 +3951,13 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
}
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
}
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -3987,7 +3987,7 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
}
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -4992,13 +4992,13 @@ namespace SteamNative
[DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
[DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
@@ -3917,13 +3917,13 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
}
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
}
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -3953,7 +3953,7 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
}
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -4958,13 +4958,13 @@ namespace SteamNative
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
[DllImport( "steam_api.dll", CallingConvention = CallingConvention.Cdecl )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
@@ -3917,13 +3917,13 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_SetBotPlayerCount(_ptr, cBotplayers);
}
public virtual void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName )
public virtual void /*void*/ ISteamGameServer_SetServerName( IntPtr /*const char **/ pszServerName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
Native.SteamAPI_ISteamGameServer_SetServerName(_ptr, pszServerName);
}
public virtual void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName )
public virtual void /*void*/ ISteamGameServer_SetMapName( IntPtr /*const char **/ pszMapName )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -3953,7 +3953,7 @@ namespace SteamNative
Native.SteamAPI_ISteamGameServer_ClearAllKeyValues(_ptr);
}
public virtual void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue )
public virtual void /*void*/ ISteamGameServer_SetKeyValue( IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue )
{
if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameServer _ptr is null!" );
@@ -4958,13 +4958,13 @@ namespace SteamNative
[DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamGameServer_WasRestartRequested( IntPtr ISteamGameServer );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMaxPlayerCount( IntPtr ISteamGameServer, int /*int*/ cPlayersMax );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetBotPlayerCount( IntPtr ISteamGameServer, int /*int*/ cBotplayers );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, string /*const char **/ pszServerName );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, string /*const char **/ pszMapName );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetServerName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszServerName );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetMapName( IntPtr ISteamGameServer, IntPtr /*const char **/ pszMapName );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetPasswordProtected( IntPtr ISteamGameServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorPort( IntPtr ISteamGameServer, ushort /*uint16*/ unSpectatorPort );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetSpectatorServerName( IntPtr ISteamGameServer, string /*const char **/ pszSpectatorServerName );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_ClearAllKeyValues( IntPtr ISteamGameServer );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, string /*const char **/ pKey, string /*const char **/ pValue );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetKeyValue( IntPtr ISteamGameServer, IntPtr /*const char **/ pKey, IntPtr /*const char **/ pValue );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameTags( IntPtr ISteamGameServer, string /*const char **/ pchGameTags );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetGameData( IntPtr ISteamGameServer, string /*const char **/ pchGameData );
[DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamGameServer_SetRegion( IntPtr ISteamGameServer, string /*const char **/ pszRegion );
@@ -1,6 +1,7 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
using System.Text;
namespace SteamNative
{
@@ -256,13 +257,21 @@ namespace SteamNative
// void
public void SetKeyValue( string pKey /*const char **/, string pValue /*const char **/ )
{
platform.ISteamGameServer_SetKeyValue( pKey, pValue );
byte[] bytesKey = Encoding.UTF8.GetBytes(pKey + "\0");
GCHandle handleKey = GCHandle.Alloc(bytesKey, GCHandleType.Pinned);
byte[] bytesValue = Encoding.UTF8.GetBytes(pValue + "\0");
GCHandle handleValue = GCHandle.Alloc(bytesValue, GCHandleType.Pinned);
platform.ISteamGameServer_SetKeyValue( handleKey.AddrOfPinnedObject(), handleValue.AddrOfPinnedObject() );
handleKey.Free(); handleValue.Free();
}
// void
public void SetMapName( string pszMapName /*const char **/ )
{
platform.ISteamGameServer_SetMapName( pszMapName );
byte[] bytes = Encoding.UTF8.GetBytes(pszMapName + "\0");
GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
platform.ISteamGameServer_SetMapName( handle.AddrOfPinnedObject() );
handle.Free();
}
// void
@@ -298,7 +307,10 @@ namespace SteamNative
// void
public void SetServerName( string pszServerName /*const char **/ )
{
platform.ISteamGameServer_SetServerName( pszServerName );
byte[] bytes = Encoding.UTF8.GetBytes(pszServerName + "\0");
GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
platform.ISteamGameServer_SetServerName( handle.AddrOfPinnedObject() );
handle.Free();
}
// void
@@ -5658,8 +5658,8 @@ namespace SteamNative
internal bool DoNotRefresh; // m_bDoNotRefresh _Bool
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
internal string GameDir; // m_szGameDir char [32]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
internal string Map; // m_szMap char [32]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
internal byte[] Map; // m_szMap char [32]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
internal string GameDescription; // m_szGameDescription char [64]
internal uint AppID; // m_nAppID uint32
@@ -5672,8 +5672,8 @@ namespace SteamNative
internal bool Secure; // m_bSecure _Bool
internal uint TimeLastPlayed; // m_ulTimeLastPlayed uint32
internal int ServerVersion; // m_nServerVersion int
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
internal string ServerName; // m_szServerName char [64]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
internal byte[] ServerName; // m_szServerName char [64]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
internal string GameTags; // m_szGameTags char [128]
internal ulong SteamID; // m_steamID class CSteamID
@@ -5707,8 +5707,8 @@ namespace SteamNative
internal bool DoNotRefresh; // m_bDoNotRefresh _Bool
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
internal string GameDir; // m_szGameDir char [32]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
internal string Map; // m_szMap char [32]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
internal byte[] Map; // m_szMap char [32]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
internal string GameDescription; // m_szGameDescription char [64]
internal uint AppID; // m_nAppID uint32
@@ -5721,8 +5721,8 @@ namespace SteamNative
internal bool Secure; // m_bSecure _Bool
internal uint TimeLastPlayed; // m_ulTimeLastPlayed uint32
internal int ServerVersion; // m_nServerVersion int
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
internal string ServerName; // m_szServerName char [64]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
internal byte[] ServerName; // m_szServerName char [64]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
internal string GameTags; // m_szGameTags char [128]
internal ulong SteamID; // m_steamID class CSteamID
@@ -5739,7 +5739,7 @@ namespace SteamNative
HadSuccessfulResponse = d.HadSuccessfulResponse,
DoNotRefresh = d.DoNotRefresh,
GameDir = d.GameDir,
Map = d.Map,
Map = (byte[])d.Map.Clone(),
GameDescription = d.GameDescription,
AppID = d.AppID,
Players = d.Players,
@@ -5749,7 +5749,7 @@ namespace SteamNative
Secure = d.Secure,
TimeLastPlayed = d.TimeLastPlayed,
ServerVersion = d.ServerVersion,
ServerName = d.ServerName,
ServerName = (byte[])d.ServerName.Clone(),
GameTags = d.GameTags,
SteamID = d.SteamID,
};
@@ -245,14 +245,13 @@
<Compile Include="Settings.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\MonoGame.Framework\DesktopGL\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework.DesktopGL">
<HintPath>..\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -258,13 +258,14 @@
<Compile Include="Settings.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\MonoGame.Framework\Windows\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Reference Include="MonoGame.Framework.WindowsDX">
<HintPath>..\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="SharpDX">
<HintPath>..\NuGet\SharpDX.4.2.0\lib\net45\SharpDX.dll</HintPath>
</Reference>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
<dllmap dll="soft_oal.dll" os="osx" target="libopenal.1.dylib" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86" target="./x86/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86" target="./x86/libopenal.so.1" />
<dllmap dll="SDL2.dll" os="linux" cpu="x86-64" target="./x64/libSDL2-2.0.so.0"/>
<dllmap dll="soft_oal.dll" os="linux" cpu="x86-64" target="./x64/libopenal.so.1" />
</configuration>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
# http://EditorConfig.org
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.cs]
indent_style = space
indent_size = 4
@@ -0,0 +1,93 @@
#OS junk files
[Tt]humbs.db
*.DS_Store
#Output Linux Installer
Installers/Linux/tmp_deb/
Installers/Linux/tmp_run/
*.run
*.deb
#Visual Studio files
*.pidb
*.userprefs
*.[Oo]bj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.csproj.csdat
ipch/
obj/
[Bb]in
[Dd]ebug*/
[Rr]elease*/
Ankh.NoLoad
.vs/
project.lock.json
/MonoGame.Framework/MonoGame.Framework.Net.WindowsUniversal.project.lock.json
/MonoGame.Framework/MonoGame.Framework.WindowsUniversal.project.lock.json
artifacts/
# JetBrains Rider
.idea/
#Tooling
_ReSharper*/
*.resharper
[Tt]est[Rr]esult*
#Visual Studio Rebracer extension, allows the user to automatically change the style configuration by project
rebracer.xml
#Subversion files
.svn
# Office Temp Files
~$*
#monodroid private beta
monodroid*.msi
#Unix temporary files
*~
# Output docs
Documentation/Output/
# Protobuild Generated Files
*.speccache
*.ncrunchproject
*.ncrunchsolution
#Mac Package Files
*.pkg
*.mpack
**/packages
#Nuget Packages
**/*.nupkg
#Zip files
*.zip
Installers/MacOS/Scripts/Framework/postinstall
IDE/MonoDevelop/MonoDevelop.MonoGame/templates/Common/MonoGame.Framework.dll.config
ThirdParty/*
@@ -0,0 +1,9 @@
[submodule "ThirdParty/Dependencies"]
path = ThirdParty/Dependencies
url = https://github.com/Mono-Game/MonoGame.Dependencies.git
[submodule "ThirdParty/NVorbis"]
path = ThirdParty/NVorbis
url=https://github.com/MrHelmut/NVorbis.git
[submodule "ThirdParty/SDL_GameControllerDB"]
path = ThirdParty/SDL_GameControllerDB
url = https://github.com/gabomdq/SDL_GameControllerDB.git
@@ -0,0 +1,525 @@
# Change Log
## 3.7.1 Release - 12/8/2018
- MGCB now generates content building statistics. [#6401](https://github.com/MonoGame/MonoGame/pull/6401)
- Fixes to dependency loading in Pipeline Tool. [#6450](https://github.com/MonoGame/MonoGame/pull/6450)
- Fixed crash when canceling choose folder dialog in Pipeline Tool. [#6449](https://github.com/MonoGame/MonoGame/pull/6449)
- Fix add item dialog jumping around in Pipeline Tool. [#6451](https://github.com/MonoGame/MonoGame/pull/6451)
- Fix OpenAL library loading on some Android phones. [#6454](https://github.com/MonoGame/MonoGame/pull/6454)
- Fix Gamepad index tracking under UWP. [#6456](https://github.com/MonoGame/MonoGame/pull/6456)
- Rename "Copy Asset Path" to "Copy Asset Name" for consistency with XNA in Pipeline Tool. [#6457](https://github.com/MonoGame/MonoGame/pull/6457)
- Fix TextInput Keys argument for UWP. [#6455](https://github.com/MonoGame/MonoGame/pull/6455)
- Add new GamePad.GetState() overloads to support different dead zone modes. [#6467](https://github.com/MonoGame/MonoGame/pull/6467)
- Fixed incorrect offset DynamicSoundEffectInstance.SubmitBuffer under XAudio. [#6523](https://github.com/MonoGame/MonoGame/pull/6523)
- Improved accuracy of fixed time step. [#6535](https://github.com/MonoGame/MonoGame/pull/6535)
- Ensure intermediate output path exists before writing stats in Pipeline Tool. [#6503](https://github.com/MonoGame/MonoGame/pull/6503)
- Fix for special window close case under SDL. [#6489](https://github.com/MonoGame/MonoGame/pull/6489)
- Marshal microphone identifiers as UTF-8. [#6530](https://github.com/MonoGame/MonoGame/pull/6530)
- Clear the current selections when excluding items in the Pipeline Tool. [#6549](https://github.com/MonoGame/MonoGame/pull/6549)
- Enable standard derivatives extension for GLSL shaders. [#6501](https://github.com/MonoGame/MonoGame/pull/6501)
- Fixed framebuffer object EXT loading under OpenGL. [#6562](https://github.com/MonoGame/MonoGame/pull/6562)
- Fixed GL.RenderbufferStorage for devices that use the EXT entry points. [#6563](https://github.com/MonoGame/MonoGame/pull/6563)
- Fix VS template installation when C# folder is missing. [#6544](https://github.com/MonoGame/MonoGame/pull/6544)
- Fix for SDL loading when a '#' is in the directory path. [#6573](https://github.com/MonoGame/MonoGame/pull/6573)
- Restored Buttons[] constructor in GamePadState fixing XNA compatibility. [#6572](https://github.com/MonoGame/MonoGame/pull/6572)
## 3.7 Release - 9/23/2018
- Remove Scale and Rotation properties from Matrix. [#5584](https://github.com/MonoGame/MonoGame/pull/5584)
- Added Switch as a platform. [#5596](https://github.com/MonoGame/MonoGame/pull/5596)
- DirectX: Fixed multisample clamping logic. [#5477](https://github.com/MonoGame/MonoGame/pull/5477)
- SDL Gamepad DB update. [#5605](https://github.com/MonoGame/MonoGame/pull/5605)
- Add Missing method OpaqueDataDictionary.GetValue. [#5637](https://github.com/MonoGame/MonoGame/pull/5637)
- Increase code coverage in Model* family. [#5632](https://github.com/MonoGame/MonoGame/pull/5632)
- Fix scroll wheel events on Windows Universal. [#5631](https://github.com/MonoGame/MonoGame/pull/5631)
- Implement GetHashCode on Vertex types. [#5654](https://github.com/MonoGame/MonoGame/pull/5654)
- Implement GetHashCode and ToString methods for Joystick. [#5670](https://github.com/MonoGame/MonoGame/pull/5670)
- Fixed Gamepad DPad on Android. [#5673](https://github.com/MonoGame/MonoGame/pull/5673)
- Pipeline process not terminating on exit fix. [#5672](https://github.com/MonoGame/MonoGame/pull/5672)
- Added Joystick.IsSupported property. [#5678](https://github.com/MonoGame/MonoGame/pull/5678)
- Use GraphicsCapabilities.MaxTextureAnisotropy on SamplerState. [#5676](https://github.com/MonoGame/MonoGame/pull/5676)
- Make SpriteBatch.End throw when Begin not called. [#5689](https://github.com/MonoGame/MonoGame/pull/5689)
- Add Open Output Directory option to Pipeline Tool. [#5690](https://github.com/MonoGame/MonoGame/pull/5690)
- Rename Exit to Quit on Pipeline Tool Linux Headerbar. [#5687](https://github.com/MonoGame/MonoGame/pull/5687)
- Added minimum size to the Pipeline Tool window. [#5692](https://github.com/MonoGame/MonoGame/pull/5692)
- Added Id and DisplayName properties to Gamepad. [#5625](https://github.com/MonoGame/MonoGame/pull/5625)
- Improved GameController database loading for DesktopGL. [#5606](https://github.com/MonoGame/MonoGame/pull/5606)
- RPC curves are now updated before Cue is played. [#5709](https://github.com/MonoGame/MonoGame/pull/5709)
- Fixes to Texture2D.FromStream on Windows DirectX. [#5712](https://github.com/MonoGame/MonoGame/pull/5712)
- Support DistanceScale and DopplerFactor under OpenAL. [#5718](https://github.com/MonoGame/MonoGame/pull/5718)
- Implemented Microphone for OpenAL platforms. [#5651](https://github.com/MonoGame/MonoGame/pull/5651)
- Implemented caching of staging resources used to copy data from a Texture2D under DirectX. [#5704](https://github.com/MonoGame/MonoGame/pull/5704)
- Reusable function for raising events. [#5713](https://github.com/MonoGame/MonoGame/pull/5713)
- Remove reference to SharpDX from project templates. [#5611](https://github.com/MonoGame/MonoGame/pull/5611)
- Improvements to VideoPlayer for Desktop DirectX. [#5737](https://github.com/MonoGame/MonoGame/pull/5737)
- Use SharpDX NuGet packages from our NuGet packages. [#5748](https://github.com/MonoGame/MonoGame/pull/5748)
- Fixed leaks that affected shutting down and recreating GraphicsDevice under DirectX. [#5728](https://github.com/MonoGame/MonoGame/pull/5728)
- Texture2D mipmap generation and population fixes. [#5614](https://github.com/MonoGame/MonoGame/pull/5614)
- Remove SharpDX.RawInput.dll reference from DirectX graphics backend. [#5723](https://github.com/MonoGame/MonoGame/pull/5723)
- New fast Texture2D.FromStream implementation for DesktopGL ported from STB. [#5630](https://github.com/MonoGame/MonoGame/pull/5630)
- Added support DrawInstancedPrimitives on OpenGL platforms. [#4920](https://github.com/MonoGame/MonoGame/pull/4920)
- Fixed mouse touch event to release when mouse moves outside the client area or we loses focus. [#5641](https://github.com/MonoGame/MonoGame/pull/5641)
- Added GraphicsAdapter.UseDebugLayers to enable GPU debug features in release builds. [#5791](https://github.com/MonoGame/MonoGame/pull/5791)
- Fixed DirectX back buffer update when multisampling changes. [#5617](https://github.com/MonoGame/MonoGame/pull/5617)
- Adds Xbox One S controller support to Linux. [#5797](https://github.com/MonoGame/MonoGame/pull/5797)
- Do not allow the Pipeline tool to delete files outside the content folder. [#5820](https://github.com/MonoGame/MonoGame/pull/5820)
- OpenGL Mouse.SetCursor now works with alpha correctly. [#5829](https://github.com/MonoGame/MonoGame/pull/5829)
- Implement Mouse.SetCursor() for Windows. [#5831](https://github.com/MonoGame/MonoGame/pull/5831)
- Fix pre-emptive song finish in OggStreamer. [#5821](https://github.com/MonoGame/MonoGame/pull/5821)
- UWP Templates use target version selected in wizard. [#5819](https://github.com/MonoGame/MonoGame/pull/5819)
- Implement Mouse.WindowHandle under Windows DirectX. [#5816](https://github.com/MonoGame/MonoGame/pull/5816)
- Improve shader error/warning parsing in Pipeline Tool. [#5849](https://github.com/MonoGame/MonoGame/pull/5849)
- Fix crash on multi-editing bool values in Pipeline Tool. [#5859](https://github.com/MonoGame/MonoGame/pull/5859)
- Fixes to XACT sound effect pooling. [#5832](https://github.com/MonoGame/MonoGame/pull/5832)
- Improved disposal of OpenGL resources. [#5850](https://github.com/MonoGame/MonoGame/pull/5850)
- Better support for WAV audio formats in content pipeline and FromStream. [#5750](https://github.com/MonoGame/MonoGame/pull/5750)
- Fix for build hang with no mgcb file in project. [#5886](https://github.com/MonoGame/MonoGame/pull/5886)
- Removed deprecated Rider settings from Linux installer. [#5881](https://github.com/MonoGame/MonoGame/pull/5881)
- Improved performance of SpriteFont.MeasureString() & SpriteBatch.DrawString(). [#5874](https://github.com/MonoGame/MonoGame/pull/5874)
- Sort content when saving MGCB files. [#5930](https://github.com/MonoGame/MonoGame/pull/5930)
- Fix a crash when building content in xbuild. [#5897](https://github.com/MonoGame/MonoGame/pull/5897)
- Fixed back button problems in UWP. [#5810](https://github.com/MonoGame/MonoGame/pull/5810)
- Removed Windows 8.1 and Windows Phone 8.1 support. [#5809](https://github.com/MonoGame/MonoGame/pull/5809)
- Upgrade to SharpDX 4.0.1. [#5949](https://github.com/MonoGame/MonoGame/pull/5949)
- Update the UWP Template to use the Latest SDK. [#5931](https://github.com/MonoGame/MonoGame/pull/5931)
- Fixed the Scissor rect calculation on DesktopGL and OpenGL platforms. [#5977](https://github.com/MonoGame/MonoGame/pull/5977)
- Calculate the Client Bounds a bit later. [#5975](https://github.com/MonoGame/MonoGame/pull/5975)
- Rework Android OpenGL Framebuffer Support. [#5993](https://github.com/MonoGame/MonoGame/pull/5993)
- Implemented GraphicsDevice.GetBackBufferData. [#5114](https://github.com/MonoGame/MonoGame/pull/5114)
- Optimizations to Length and Normalize in Vector3 and Vector4. [#6004](https://github.com/MonoGame/MonoGame/pull/6004)
- Added MGCB man page for Linux. [#5987](https://github.com/MonoGame/MonoGame/pull/5987)
- Included mgcb autocomplete for bash. [#5985](https://github.com/MonoGame/MonoGame/pull/5985)
- Fixed GamePad.SetVibration crash. [#5965](https://github.com/MonoGame/MonoGame/pull/5965)
- Fallback SurfaceFormat for RenderTargets. [#6170](https://github.com/MonoGame/MonoGame/pull/6170)
- Added O(1) EffectParameter lookups by name. [#6146](https://github.com/MonoGame/MonoGame/pull/6146)
- Reduce MouseState garbage in Desktop DirectX. [#6168](https://github.com/MonoGame/MonoGame/pull/6168)
- Made SpriteFont constructor public. [#6126](https://github.com/MonoGame/MonoGame/pull/6126)
- New Template System using Nuget. [#6135](https://github.com/MonoGame/MonoGame/pull/6135)
- Use StbSharp for all Texture2D.FromStream. [#6008](https://github.com/MonoGame/MonoGame/pull/6008)
- Dynamic reference loading in Pipeline Tool. [#6202](https://github.com/MonoGame/MonoGame/pull/6202)
- Fix Pipeline tool to work regardless of Mono changes. [#6197](https://github.com/MonoGame/MonoGame/pull/6197)
- Update Template Icons and Fix Mac Info.plist. [#6209](https://github.com/MonoGame/MonoGame/pull/6209)
- Fix typo in VS2013 Shared Project Template. [#6216](https://github.com/MonoGame/MonoGame/pull/6216)
- Fill up dotnet template info. [#6226](https://github.com/MonoGame/MonoGame/pull/6226)
- Support Mac Unit Tests. [#5952](https://github.com/MonoGame/MonoGame/pull/5952)
- Updated Assimp to latest version. [#6222](https://github.com/MonoGame/MonoGame/pull/6222)
- Make sure that the window titlebar is within screen bounds on DesktopGL. [#6258](https://github.com/MonoGame/MonoGame/pull/6258)
- Fixed trigger/dpad button state and reduced garbage in iOS Gamepad. [#6271](https://github.com/MonoGame/MonoGame/pull/6271)
- Updated Windows Universal Min SDK Versions. [#6257](https://github.com/MonoGame/MonoGame/pull/6257)
- Fix property content serialization detection when using a property named `Item`. [#5996](https://github.com/MonoGame/MonoGame/pull/5996)
- Fix launcher default mimetype in Linux installer. [#6275](https://github.com/MonoGame/MonoGame/pull/6275)
- Restore NVTT. [#6239](https://github.com/MonoGame/MonoGame/pull/6239)
- Support unicode in window title under DesktopGL. [#6335](https://github.com/MonoGame/MonoGame/pull/6335)
- Add crash report window to Pipeline Tool. [#6272](https://github.com/MonoGame/MonoGame/pull/6272)
- Fix linking for copy action in Pipeline Tool. [#6398](https://github.com/MonoGame/MonoGame/pull/6398)
- Implemented KeyboardInput and MessageBox for Windows DX. [#6410](https://github.com/MonoGame/MonoGame/pull/6410)
- Fixed audio interruption bug on iOS. [#6433](https://github.com/MonoGame/MonoGame/pull/6433)
## 3.6 Release - 2/28/2017
- Fixed XML deserialization of Curve type. [#5494](https://github.com/MonoGame/MonoGame/pull/5494)
- Fix #5498 Pipeline Tool template loading on MacOS. [#5501](https://github.com/MonoGame/MonoGame/pull/5501)
- Fix typo in the exclude.addins which cause warnings when installing the Addin in XS. [#5500](https://github.com/MonoGame/MonoGame/pull/5500)
- Added support for arbitrary defines passed to the Effect compiler. [#5496](https://github.com/MonoGame/MonoGame/pull/5496)
- Fixed GraphicsDevice.Present() to check for current render target. [#5389](https://github.com/MonoGame/MonoGame/pull/5389)
- Custom texture compression for SpriteFonts. [#5299](https://github.com/MonoGame/MonoGame/pull/5299)
- Performance improvements to SpriteBatch.DrawString(). [#5226](https://github.com/MonoGame/MonoGame/pull/5226)
- Removed the OUYA platform [#5194](https://github.com/MonoGame/MonoGame/pull/5194)
- Dispose of all graphical resources in unit tests. [#5133](https://github.com/MonoGame/MonoGame/pull/5133)
- Throw NoSuitableGraphicsDeviceException if graphics device creation fails. [#5130](https://github.com/MonoGame/MonoGame/pull/5130)
- Optimized and added additional constructors to Color. [#5117](https://github.com/MonoGame/MonoGame/pull/5117)
- Added SamplerState.TextureFilterMode to correctly support comparison filtering. [#5112](https://github.com/MonoGame/MonoGame/pull/5112)
- Fixed Apply3D() on stereo SoundEffect. [#5099](https://github.com/MonoGame/MonoGame/pull/5099)
- Fixed Effect.OnApply to return void to match XNA. [#5090](https://github.com/MonoGame/MonoGame/pull/5090)
- Fix crash when DynamicSoundEffectInstance not disposed. [#5075](https://github.com/MonoGame/MonoGame/pull/5075)
- Texture2D.FromStream now correctly throws on null arguments. [#5050](https://github.com/MonoGame/MonoGame/pull/5050)
- Implemented GraphicsAdapter for DirectX platforms. [#5024](https://github.com/MonoGame/MonoGame/pull/5024)
- Fixed initialization of GameComponent when created within another GameComponent. [#5020](https://github.com/MonoGame/MonoGame/pull/5020)
- Improved SoundEffect internal platform extendability. [#5006](https://github.com/MonoGame/MonoGame/pull/5006)
- Refactored audio processing for platform extensibility. [#5001](https://github.com/MonoGame/MonoGame/pull/5001)
- Refactored texture processing for platform extensibility. [#4996](https://github.com/MonoGame/MonoGame/pull/4996)
- Refactor ShaderProfile to allow for pipeline extensibility. [#4992](https://github.com/MonoGame/MonoGame/pull/4992)
- Removed unnessasary dictionary lookup for user index buffers for DirectX platforms. [#4988](https://github.com/MonoGame/MonoGame/pull/4988)
- New SetRenderTargets() method which allows for variable target count. [#4987](https://github.com/MonoGame/MonoGame/pull/4987)
- Added support for XACT reverb and filter effects. [#4974](https://github.com/MonoGame/MonoGame/pull/4974)
- Remove array in GamePadDPad constructor. [#4970](https://github.com/MonoGame/MonoGame/pull/4970)
- Updated to the latest version of Protobuild. [#4964](https://github.com/MonoGame/MonoGame/pull/4964)
- Fixed static VBs and IBs on UWP on XB1. [#4955](https://github.com/MonoGame/MonoGame/pull/4955)
- Updated to the latest version of Protobuild. [#4950](https://github.com/MonoGame/MonoGame/pull/4950)
- Update Xamarin Studio addin for latest platform changes. [#4926](https://github.com/MonoGame/MonoGame/pull/4926)
- Replace OpenTK with custom OpenGL bindings [#4874](https://github.com/MonoGame/MonoGame/pull/4874)
- Fix Mouse updating when moving the Window. [#4924](https://github.com/MonoGame/MonoGame/pull/4924)
- Fix incorrect use of startIndex in Texture2D.GetData DX. [#4833](https://github.com/MonoGame/MonoGame/pull/4833)
- Cleanup of AssemblyInfo for framework assembly. [#4810](https://github.com/MonoGame/MonoGame/pull/4810)
- New SDL2 backend for desktop GL platforms. [#4428](https://github.com/MonoGame/MonoGame/pull/4428)
- Two MaterialProcessor properties fixed. [#4746](https://github.com/MonoGame/MonoGame/pull/4746)
- Fixed thumbstick virtual buttons to always use independent axes. [#4742](https://github.com/MonoGame/MonoGame/pull/4742)
- Fixed back buffer MSAA on DirectX platforms. [#4739](https://github.com/MonoGame/MonoGame/pull/4739)
- Added new CHANGELOG.md to project. [#4732](https://github.com/MonoGame/MonoGame/pull/4732)
- Added obsolete attribute and updated documentation. [#4731](https://github.com/MonoGame/MonoGame/pull/4731)
- Fixed layout of UWP windows in VS template to ignore window chrome. [#4727](https://github.com/MonoGame/MonoGame/pull/4727)
- Remove support for reading raw assets through ContentManager. [#4726](https://github.com/MonoGame/MonoGame/pull/4726)
- Implemented DynamicSoundEffectInstance for DirectX and OpenAL platforms. [#4715](https://github.com/MonoGame/MonoGame/pull/4715)
- Removed unused Yeti Mp3 compressor. [#4713](https://github.com/MonoGame/MonoGame/pull/4713)
- MonoGame Portable Assemblies. [#4712](https://github.com/MonoGame/MonoGame/pull/4712)
- Fixed RGBA64 packing and added unit tests. [#4683](https://github.com/MonoGame/MonoGame/pull/4683)
- Fix Gamepad crash when platform doesn't support the amount. [#4677](https://github.com/MonoGame/MonoGame/pull/4677)
- Fixed Song stopping before they are finished on Windows. [#4668](https://github.com/MonoGame/MonoGame/pull/4668)
- Removed the Linux .deb installer. [#4665](https://github.com/MonoGame/MonoGame/pull/4665)
- OpenAssetImporter is now automatically selected for all the formats it supports. [#4663](https://github.com/MonoGame/MonoGame/pull/4663)
- Fixed broken unit tests under Linux. [#4614](https://github.com/MonoGame/MonoGame/pull/4614)
- Split out Title Container into partial classes. [#4590](https://github.com/MonoGame/MonoGame/pull/4590)
- Added Rider Support to Linux installer. [#4589](https://github.com/MonoGame/MonoGame/pull/4589)
- Implement vertexStride in VertexBuffer.SetData for OpenGL. [#4568](https://github.com/MonoGame/MonoGame/pull/4568)
- Performance improvement to SpriteBatch vertex generation. [#4547](https://github.com/MonoGame/MonoGame/pull/4547)
- Optimization of indices initialization in SpriteBatcher. [#4546](https://github.com/MonoGame/MonoGame/pull/4546)
- Optimized ContentReader to decode LZ4 compressed streams directly. [#4522](https://github.com/MonoGame/MonoGame/pull/4522)
- TitleContainer partial class cleanup. [#4520](https://github.com/MonoGame/MonoGame/pull/4520)
- Remove raw asset support from ContentManager. [#4489](https://github.com/MonoGame/MonoGame/pull/4489)
- Initial implementation of RenderTargetCube for OpenGL. [#4488](https://github.com/MonoGame/MonoGame/pull/4488)
- Removed unnecessary platform differences in MGFX. [#4486](https://github.com/MonoGame/MonoGame/pull/4486)
- SoundEffect fixes and tests. [#4469](https://github.com/MonoGame/MonoGame/pull/4469)
- Cleanup FX syntax for shader compiler. [#4462](https://github.com/MonoGame/MonoGame/pull/4462)
- General Improvements to Pipeline Gtk implementation. [#4459](https://github.com/MonoGame/MonoGame/pull/4459)
- ShaderProfile Refactor. [#4438](https://github.com/MonoGame/MonoGame/pull/4438)
- GraphicsDeviceManager partial class refactor. [#4425](https://github.com/MonoGame/MonoGame/pull/4425)
- Remove legacy Storage classes. [#4320](https://github.com/MonoGame/MonoGame/pull/4320)
- Added mipmap generation for DirectX render targets. [#4189](https://github.com/MonoGame/MonoGame/pull/4189)
## 3.5.1 Release - 3/30/2016
- Fixed negative values when pressing up on left thumbstick on Mac.
- Removed exception and just return empty state when requesting an invalid GamePad index.
- Fixed texture processing for 64bpp textures.
- Fixed Texture2D.SaveAsPng on Mac.
## 3.5 Release - 3/17/2016
- Content Pipeline Integration for Xamarin Studio and MonoDevleop on Mac and Linux.
- Automatic inclusion of XNBs into your final project on Mac and Linux.
- Improved Mac and Linux installers.
- Assemblies are now installed locally on Mac and Linux just like they are on Windows.
- New cross-platform “Desktop” project where same binary and content will work on Windows, Linux and Mac desktops.
- Better Support for Xamarin.Mac and Xam.Mac.
- Apple TV support (requires to be built from source at the moment).
- Various sound system fixes.
- New GraphicsMetrics API.
- Optimizations to SpriteBatch performance and garbage generation.
- Many improvements to the Pipeline tool: added toolbar, new filtered output view, new templates, drag and drop, and more.
- New GamePad support for UWP.
- Mac and Linux now support Vorbis compressed music.
- Major refactor of texture support in content pipeline.
- Added 151 new unit tests.
- Big improvements to FBX and model content processing.
- Various fixes to XML serialization.
- MediaLibrary implementation for Windows platforms.
- Removed PlayStation Mobile platform.
- Added content pipeline extension template project.
- Support for binding multiple vertex buffers in a draw call.
- Fixed deadzone issues in GamePad support.
- OcclusionQuery support for DX platforms.
- Fixed incorrect z depth in SpriteBatch.
- Lots of OpenTK backend fixes.
- Much improved font processing.
- Added new VertexPosition vertex format.
- Better VS project template installation under Windows.
## 3.4 Release - 4/29/2015
- Removed old XNA content pipeline extensions.
- Added all missing PackedVector types.
- Replacement of old SDL joystick path with OpenTK.
- Added SamplerState.ComparisonFunction feature to DX and OGL platforms.
- Fixed bug where content importers would not be autodetected on upper case file extensions.
- Fixed compatibility with XNA sound effect XNBs.
- Lots of reference doc improvements.
- Added SamplerState.BorderColor feature to DX and OGL platforms.
- Lots of improvements to the Mac, Linux and Windows versions of the Pipeline GUI tool.
- Fixes for bad key mapping on Linux.
- Support for texture arrays on DX platforms.
- Fixed broken ModelMesh.Tag
- VS templates will now only install if VS is detected on your system.
- Added Color.MonoGameOrange.
- Fixed Xact SoundBack loading bug on Android.
- Added support for a bunch of missing render states to MGFX.
- Added support for sRGB texture formats to DX and OGL platforms.
- Added RasterizerState.DepthClipEnable support for DX and OGL platforms.
- New support for the Windows 10 UAP plafform.
- Fixed bug which caused the GamePad left thumbstick to not work correctly.
- Preliminary base classed for future Joystick API.
- Performance improvement on iOS by avoiding unnessasary GL context changes.
- Fixed bug where MediaPlayer volume affected all sounds.
- New XamarinStudio/MonoDevelop Addin for Mac.
- New Mac installer packages.
## 3.3 Release - 3/16/2015
- Support for vertex texture fetch on Windows.
- New modern classes for KeyboardInput and MessageBox.
- Added more validation to draw calls and render states.
- Cleaned up usage of statics to support multiple GraphicsDevice instances.
- Support Window.Position on WindowsGL platform.
- Reduction of redundant OpenGL calls.
- Fullscreen support for Windows DX platform.
- Implemented Texture2D SaveAsPng and SaveAsJpeg for Android.
- Improved GamePad deadzone calculations.
- We now use FFmpeg for audio content building.
- BoundingSphere fixes and optimizations.
- Many improvements to Linux platform.
- Various fixes to FontTextureProcessor.
- New Windows Universal App template for Windows Store and Windows Phone support.
- Many fixes to reduce garbage generation during runtime.
- Adding support for TextureFormatOptions to FontDescriptionProcessor.
- XNA compatibility improvements to FontDescriptionProcessor.
- Resuscitated the unit test framework with 100s of additional unit tests.
- BoundingFrustum fixes and optimizations.
- Added VS2013 project templates.
- Moved to new MonoGame logo.
- Added MSAA render target support for OpenGL platforms.
- Added optional content compression support to content pipeline and runtime.
- TextureCube content reader and GetData fixes.
- New OpenAL software implementation for Android.
- Xact compatibility improvements.
- Lots of Android fixes and improvements.
- Added MediaLibrary implementation for Android, iOS, Windows Phone, and Windows Store.
- Added ReflectiveWriter implementation to content pipeline.
- Fixes to Texture2D.GetData on DirectX platforms.
- SpriteFont rendering performance optimizations.
- Huge refactor of ModelProcessor to be more compatible with XNA.
- Moved NET and GamerServices into its own MonoGame.Framework.Net assembly.
- Runtime support for ETC1 textures for Androud.
- Improved compatibility for FBXImporter and XImporter.
- Multiple SpritBatch compatibility fixes.
- We now use FreeImage in TextureImporter to support many more input formats.
- MGFX parsing and render state improvements.
- New Pipeline GUI tool for managing content projects for Windows, Mac, and Linux desktops.
- New implementation of content pipeline IntermediateSerializer.
- All tools and content pipeline built for 64-bit.
- New documentation system.
- Implement web platform (JSIL) stubs.
- Lots of fixes to PSM.
- Added Protobuild support for project generation.
- Major refactor of internals to better separate platform specific code.
- Added MGCB command line tool to Windows installer.
## 3.2 Release - 4/7/2014
- Implemented missing PackedVector types.
- VS2013 support for MonoGame templates.
- Big improvement to XInput performance on Windows/Windows8.
- Added GameWindow.TextInput event enhancement.
- Added Xamarin.Mac compatability.
- Support for WPF interop under DirectX.
- Enhancement to support multiple GameWindows on Windows under DirectX.
- Various SpriteFont compatibility improvements.
- OpenAL performance/memory/error handling improvements.
- Reduction of Effect runtime memory usage.
- Support for DXT/S3TC textures on Android.
- Touch support on Windows desktop games.
- Added new RenderTarget3D enhancement.
- OUYA gamepad improvements.
- Internal improvements to reduce garbage generation.
- Various windowing fixes for OpenTK on Linux, Mac, and Windows.
- Automatic support for content reloading on resume for Android.
- Support for TextureCube, Texture3D, and RenderTargetCube on DirectX.
- Added TitleContainer.SupportRetina enhancement for loading @2x content.
- Lots of Android/Kindle compatibility fixes.
- Added enhancement GameWindow.IsBorderless.
- OpenGL now supports multiple render targets.
- Game.IsRunningSlowly working accurately to XNA.
- Game tick resolution improvements.
- XACT compatibility improvements.
- Various fixes and improvements to math types.
- DrawUserIndexedPrimitives now works with 32bit indicies.
- GamerServices fixes under iOS.
- Various MonoGame FX improvements and fixes.
- Render target fixes for Windows Phone.
- MediaPlayer/MediaQueue/Song fixes on Windows Phone.
- XNA accuracy fixes to TitleContainer.
- Fixes to SpriteBatch performance and compatibility with XNA.
- Threading fixes around SoundEffectInstance.
- Support for Song.Duration.
- Fixed disposal of OpenGL shader program cache.
- Improved support of PoT textures in OpenGL.
- Implemented missing EffectParameter SetValue/GetValue calls.
- Touch fixes to Windows Phone.
- Fixes to orientation support in iOS.
- Lots of PSM fixes which make it usable for 2D games.
- New Windows desktop platform using DirectX/XAudio.
- Old Windows project renamed WindowsGL.
- Fixed offsetInBytes parameter in IndexBuffer/VertexBuffer SetData.
- Fixed subpixel offset when viewport is changed in OpenGL.
- Tons of content pipeline improvements making it close to complete.
## 3.0.1 Release - 3/3/2013
- Fix template error.
- Fix offsetInBytes parameter in IndexBuffer/VertexBuffer SetData.
- Fixes the scale applied on the origin in SpriteBatch.
- Fixed render targets on WP8.
- Removed minVertexIndex Exception.
- Fixed some threading issues on iOS.
- Use generic link for opening store on iOS.
- Fix Matrix::Transpose.
- Fixed vertexOffset in DrawUserIndexedPrimitives in GL.
- Keys.RightControl/RightShift Support for WinRT.
- Dispose in ShaderProgramCache.
- IsRunningSlowly Fix.
## 3.0 Release - 1/21/2013
- 3D (many thanks to Infinite Flight Studios for the code and Sickhead Games in taking the time to merge the code in).
- New platforms: Windows 8, Windows Phone 8, OUYA, PlayStation Mobile (including Vita).
- Custom Effects.
- PVRTC support for iOS.
- iOS supports compressed Songs.
- Skinned Meshs.
- VS2012 templates.
- New Windows Installer.
- New MonoDevelop Package/AddIn.
- A LOT of bug fixes.
- Closer XNA 4 compatibility.
## 2.5.1 Release - 6/18/2012
- Updated android to use enumerations rather than hardocded ids as part of the Mono for Android 4.2 update.
- Changed the Android video player to make use of the ViewView.
- Corrected namespaces for SongReader and SoundEffectReader.
- Updated the Keyboard mapping for android.
- Added RectangleArrayReader.
- Removed links to the third party GamePadBridge.
- Added some missing mouseState operators.
- Replaced all calls to DateTime.Now with DateTime.UtcNow.
- Fixed SpriteFont rendering (again).
- Added code to correclty dispose of Textures on all platforms.
- Added some fixes for the sound on iOS.
- Adding missing MediaQueue class.
- Fixed Rectangle Intersect code.
- Changed the way UserPrimitives work on windows.
- Made sure the @2x file support on iOS works.
- Updated project templates.
- Added project templates for MacOS.
- Fixed MonoDevelop.MonoGame AddIn so it works on Linux.
## 2.5 Release - 3/29/2012
### Fixes and Features
- Minor fixes to the Networking stack to make it more reliable when looking for games.
- SpriteBatch Fixes including making sure the matrix parameter is applied in both gles 1.1 and gles 2.0.
- Updated IDrawable and IUpdatable interfaces to match XNA 4.0.
- Fixed the Tick method.
- Updated VideoPlayer constructor contract to match XNA 4.0.
- Added Code to Lookup the Host Application Guid for Networking, the guid id is now pulled from the AssemblyInfo.cs if one is present.
- Uses OpenAL on all platforms except Android.
- Added Dxt5 decompression support.
- Improves SpriteFont to conform more closely to XNA 4.0.
- Moved DynamicVertexBuffer and DynamicIndexBuffer into its own files.
### iOS
- Fixed Console.WriteLine problem.
- Fixed loading of @2x Retina files.
- Fixed Landscape Rendering.
- Fixed Orientations changes correctly animate.
- Fixed Guide.BeginShowKeyboardInput.
- Fixed StorageDevice AOT compile problem.
- Fixed SpriteBatch to respect matrices when drawn.
- Fixed DoubleTap, improves touches in serial Game instances.
- Fixed App startup in non-Portrait orientations.
- Fixed UnauthorizedAccessException using TitleContainer.
- Fixed a runtime JIT error that was occuring with List<AddJournalEntry<T>().
- Guide.ShowKeyboard is not working.
- App Backgrounding has regressed. A patch is already being tested in the develop branch and the fix will be rolled out as part of the v2.5.1.
### Android
- Project Templates for MonoDevelop.
- Fixed a few issues with Gestures.
- Fixed the name of the assembly to be MonoGame.Framework.Android.
- Fixed a Memory Leak in Texture Loading.
- Force linear filter and clamp wrap on npot textures in ES2.0 on Android.
- Added SetData and GetData support for Texture2D.
- Guide.SignIn picks up the first email account on the phone.
- CatapultWars does not render correctly under gles 1.1.
### MacOS X
- SoundEffectInstance.Stop now works correctly.
### Linux
- Project Templates for Visual Studio and MonoDevelop.
- Fixed a bug when loading of Wav files.
### Windows
- Project Templates for Visual Studio and MonoDevelop.
- Fixed a bug when loading of Wav files.
- Added Game.IsMouseVisible implementation for Windows.
- Guide.SignIn picks up the logged in user.
- Added a new Installer to install the MonoDevelop and / or Visual Studio Templates and binaries.
## 2.1 Release - 10/28/2011
### Features
- Content Manager rewritten to use partial classes and implementation of cached assets that are loaded. Greatly improves memory footprint.
- Experimental support for GamePads and Joysticks. Enhancements will be coming to integrate better for developers.
- ContentReader improvements across the board.
- Improved support for XACT audio.
- StarterKits VectorRumble.
### iOS
- Gesture support has been improved.
- Better support for portrait to landscape rotations.
- Fixed a rendering bug related to upsidedown portrait mode.
- Better WaveBank support.
- The Guide functionality is only available in iOS, for this release.
### Android
- Updated to support Mono for Android 4.0.
- Improvements to the Orientation Support.
- Changed Sound system to use SoundPool.
- Added Tap and DoubleTap Gesture Support.
### MacOS X
- A lot of enhancements and fixes for Full Screen and Windowed control.
- Cursor support fixed for IsMouseVisible.
- Implementation of IsActive property and the events Activated and Deactivated.
- First steps of DrawPrimitives, DrawUserPrimitives, DrawIndexedPrimitives.
- Better WaveBank support.
- Support for ApplyChanges() and setting the backbuffer and viewport sizes correctly.
### Linux
- All new implementation which share quite a bit of code between MacOS X and Windows.
- Added shader support via the Effects class.
### Windows
- All new implementation which shares quite a bit of code between MacOS and Linux.
## 2.0 Release - 10/28/2011
- Project renamed MonoGame.
- Project moved to GitHub.
- Support for Linux, Mac, Linux, and OpenGL on Windows.
## 0.7 Release - 12/2/2009
- First stable release.
- Originally named XnaTouch.
- iPhone support only.
- 2D rendering support.
- Audio support.
- Networking support.
- Partial multitouch support.
- Partial accelerometer support.
@@ -0,0 +1,228 @@
> #### NOTE: This code style standard for MonoGame is a work in progress and much of the code does not currently conform to these rules. This is something that will be addressed by the core team.
# Introduction
As the MonoGame project gains more traction and becomes more widely used, we aim to provide a more professional and consistent look to the large amount of source now in the project. It was a broadly supported decision by the core development team to follow the Microsoft coding guidelines (the default provided in Visual Studio's C# editor). These coding guidelines listed below are based on a [MSDN blog post](http://blogs.msdn.com/b/brada/archive/2005/01/26/361363.aspx) from 2005 by Brad Abrams describing the internal coding guidelines at Microsoft, with some changes to suit our project.
# Coding Guidelines
## Tabs & Indenting
Tab characters (\0x09) should not be used in code. All indentation should be done with 4 space characters.
## Bracing
Open braces should always be at the beginning of the line after the statement that begins the block. Contents of the brace should be indented by 4 spaces. Single statements do not have braces. For example:
```
if (someExpression)
{
DoSomething();
DoAnotherThing();
}
else
DoSomethingElse();
```
`case` statements should be indented from the switch statement like this:
```
switch (someExpression)
{
case 0:
DoSomething();
break;
case 1:
DoSomethingElse();
break;
case 2:
{
int n = 1;
DoAnotherThing(n);
}
break;
}
```
Braces are not used for single statement blocks immediately following a `for`, `foreach`, `if`, `do`, etc. The single statement block should always be on the following line and indented by four spaces. This increases code readability and maintainability.
```
for (int i = 0; i < 100; ++i)
DoSomething(i);
```
## Single line property statements
Single line property statements can have braces that begin and end on the same line. This should only be used for simple property statements. Add a single space before and after the braces.
```
public class Foo
{
int bar;
public int Bar
{
get { return bar; }
set { bar = value; }
}
}
```
## Commenting
Comments should be used to describe intention, algorithmic overview, and/or logical flow. It would be ideal if, from reading the comments alone, someone other than the author could understand a function's intended behavior and general operation. While there are no minimum comment requirements (and certainly some very small routines need no commenting at all), it is best that most routines have comments reflecting the programmer's intent and approach.
Comments must provide added value or explanation to the code. Simply describing the code is not helpful or useful.
```
// Wrong
// Set count to 1
count = 1;
// Right
// Set the initial reference count so it isn't cleaned up next frame
count = 1;
```
### Copyright/License notice
Each file should start with a copyright notice. This is a short statement declaring the project name and copyright notice, and directing the reader to the license document elsewhere in the project. To avoid errors in doc comment builds, avoid using triple-slash doc comments.
```
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
```
### Documentation Comments
All methods should use XML doc comments. For internal dev comments, the `<devdoc>` tag should be used.
```
public class Foo
{
/// <summary>Public stuff about the method</summary>
/// <param name="bar">What a neat parameter!</param>
/// <devdoc>Cool internal stuff!</devdoc>
public void MyMethod(int bar)
{
...
}
}
```
### Comment Style
The // (two slashes) style of comment tags should be used in most situations. Wherever possible, place comments above the code instead of beside it. Here are some examples:
```
// This is required for WebClient to work through the proxy
GlobalProxySelection.Select = new WebProxy("http://itgproxy");
// Create object to access Internet resources
WebClient myClient = new WebClient();
```
## Spacing
Spaces improve readability by decreasing code density. Here are some guidelines for the use of space characters within code:
Do use a single space after a comma between function arguments.
```
Console.In.Read(myChar, 0, 1); // Right
Console.In.Read(myChar,0,1); // Wrong
```
Do not use a space after the parenthesis and function arguments.
```
CreateFoo(myChar, 0, 1) // Right
CreateFoo( myChar, 0, 1 ) // Wrong
```
Do not use spaces between a function name and parentheses.
```
CreateFoo() // Right
CreateFoo () // Wrong
```
Do not use spaces inside brackets.
```
x = dataArray[index]; // Right
x = dataArray[ index ]; // Wrong
```
Do use a single space before flow control statements.
```
while (x == y) // Right
while(x==y) // Wrong
```
Do use a single space before and after binary operators.
```
if (x == y) // Right
if (x==y) // Wrong
```
Do not use a space between a unary operator and the operand.
```
++i; // Right
++ i; // Wrong
```
Do not use a space before a semi-colon. Do use a space after a semi-colon if there is more on the same line.
```
for (int i = 0; i < 100; ++i) // Right
for (int i=0 ; i<100 ; ++i) // Wrong
```
## Naming
Follow all .NET Framework Design Guidelines for both internal and external members. Highlights of these include:
* Do not use Hungarian notation
* Do use an underscore prefix for member variables, e.g. "_foo"
* Do use camelCasing for member variables (first word all lowercase, subsequent words initial uppercase)
* Do use camelCasing for parameters
* Do use camelCasing for local variables
* Do use PascalCasing for function, property, event, and class names (all words initial uppercase)
* Do prefix interfaces names with "I"
* Do not prefix enums, classes, or delegates with any letter
The reasons to extend the public rules (no Hungarian, underscore prefix for member variables, etc.) is to produce a consistent source code appearance. In addition, the goal is to have clean, readable source. Code legibility should be a primary goal.
## File Organization
* Source files should contain only one public type, although multiple internal types are permitted if required
* Source files should be given the name of the public type in the file
* Directory names should follow the namespace for the class after `Framework`. For example, one would expect to find the public class `Microsoft.Xna.Framework.Graphics.GraphicsDevice` in **MonoGame.Framework\Graphics\GraphicsDevice.cs**
* Class members should be grouped logically, and encapsulated into regions (Fields, Constructors, Properties, Events, Methods, Private interface implementations, Nested types)
* Using statements should be before the namespace declaration.
```
using System;
namespace MyNamespace
{
public class MyClass : IFoo
{
#region Fields
int foo;
#endregion
#region Properties
public int Foo { get { ... } set { ... } }
#endregion
#region Constructors
public MyClass()
{
...
}
#endregion
#region Events
public event EventHandler FooChanged { add { ... } remove { ... } }
#endregion
#region Methods
void DoSomething()
{
...
}
void FindSomething()
{
...
}
#endregion
#region Private interface implementations
void IFoo.DoSomething()
{
DoSomething();
}
#endregion
#region Nested types
class NestedType
{
...
}
#endregion
}
}
```
# Useful Links
[C# Coding Conventions (MSDN)](http://msdn.microsoft.com/en-us/library/ff926074.aspx)
@@ -0,0 +1,79 @@
# Contributing to MonoGame
We're happy that you have chosen to contribute to the MonoGame project.
You are joining a group of hundreds of volunteers that have helped build MonoGame since 2009. To organize these efforts, the MonoGame Team has written this simple guide to help you.
Please read this document completely before contributing.
## How To Contribute
MonoGame has a `master` branch for stable releases and a `develop` branch for daily development. New features and fixes are always submitted to the `develop` branch.
If you are looking for ways to help, you should start by looking at the [Help Wanted tasks](https://github.com/mono/MonoGame/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22). Please let us know if you plan to work on an issue so that others are not duplicating work.
The MonoGame project follows standard [GitHub flow](https://guides.github.com/introduction/flow/index.html). You should learn and be familiar with how to [use Git](https://help.github.com/articles/set-up-git/), how to [create a fork of MonoGame](https://help.github.com/articles/fork-a-repo/), and how to [submit a Pull Request](https://help.github.com/articles/using-pull-requests/).
After you submit a PR, the [MonoGame build server](http://teamcity.monogame.net/?guest=1) will build your changes and verify all tests pass. Project maintainers and contributors will review your changes and provide constructive feedback to improve your submission.
Once we are satisfied that your changes are good for MonoGame, we will merge it.
## Quick Guidelines
Here are a few simple rules and suggestions to remember when contributing to MonoGame.
* :bangbang: **NEVER** commit code that you didn't personally write.
* :bangbang: **NEVER** use decompiler tools to steal code and submit them as your own work.
* :bangbang: **NEVER** decompile XNA assemblies and steal Microsoft's copyrighted code.
* **PLEASE** try keep your PRs focused on a single topic and of a reasonable size or we may ask you to break it up.
* **PLEASE** be sure to write simple and descriptive commit messages.
* **DO NOT** surprise us with new APIs or big new features. Open an issue to discuss your ideas first.
* **DO NOT** reorder type members as it makes it difficult to compare code changes in a PR.
* **DO** try to follow our [coding style](CODESTYLE.md) for new code.
* **DO** give priority to the existing style of the file you're changing.
* **DO** try to add to our [unit tests](Test) when adding new features or fixing bugs.
* **DO NOT** send PRs for code style changes or make code changes just for the sake of style.
* **PLEASE** keep a civil and respectful tone when discussing and reviewing contributions.
* **PLEASE** tell others about MonoGame and your contributions via social media.
## Decompiler Tools
We prohibit the use of tools like dotPeek, ILSpy, JustDecompiler, or .NET Reflector which convert compiled assemblies into readable code.
There has been confusion on this point in the past, so we want to make this clear. It is **NEVER ACCEPTABLE** to decompile copyrighted assemblies and submit that code to the MonoGame project.
* It **DOES NOT** matter how much you change the code.
* It **DOES NOT** matter what country you live in or what your local laws say.
* It **DOES NOT** matter that XNA is discontinued.
* It **DOES NOT** matter how small the bit of code you have stolen is.
* It **DOES NOT** matter what your opinion is of stealing code.
If you did not write the code, you do not have ownership of the code and you shouldn't submit it to MonoGame.
If we find a contribution to be in violation of copyright, it will be immediately removed. We will bar that contributor from the MonoGame project.
## Licensing
The MonoGame project is under the [Microsoft Public License](https://opensource.org/licenses/MS-PL) except for a few portions of the code. See the [LICENSE.txt](LICENSE.txt) file for more details. Third-party libraries used by MonoGame are under their own licenses. Please refer to those libraries for details on the license they use.
We accept contributions in "good faith" that it isn't bound to a conflicting license. By submitting a PR you agree to distribute your work under the MonoGame license and copyright.
To this end, when submitting new files, include the following in the header if appropriate:
```csharp
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
```
## Need More Help?
If you need help, please ask questions on our [community forums](http://community.monogame.net/) or come [chat on Gitter](https://gitter.im/mono/MonoGame).
Thanks for reading this guide and helping make MonoGame great!
:heart: The MonoGame Team
@@ -0,0 +1,47 @@
The 2MGFX tool is used to build a MonoGame Effect from an input Microsoft FX or MGFX file.
## Command Line
The command line options are:
```
2MGFX <SourceFile> <OutputFile> [/Debug] [/Profile:<DirectX_11,OpenGL,PlayStation4>]
```
### Source File
The input effect file in typical FX format with samplers, techniques, and passes defined. This parameter is required.
### Output File
The file to write for the output compiled MGFX file. This parameter is required.
NOTE: The generated file is not an XNB file for use with the ContentManager.
### Debug Info
If the `/Debug` flag is passed the resulting compiled MGFX file will contain extra debug information and the fewest possible optimizations.
### Platform Profile
The `/Profile` option defines the platform we're targeting with this effect file. It can be one of the following:
```
DirectX_11
OpenGL
PlayStation4
PSVita
XboxOne
Switch
```
NOTE: PlayStation 4, Xbox One, PS Vita, and Switch support is only available to licensed console developers.
### Help
If you use `/?`, `/help`, or simply pass no paramters to 2MGFX.exe you will get information about these command line options.
## Runtime Use
The resulting compiled MGFX file can be used from your game code like so:
```csharp
byte[] bytecode = File.ReadAllBytes("mycompiled.mgfx");
var effect = new Effect(bytecode);
```
This is basically how the stock effects (BasicEffect, DualTextureEffect, etc) are compiled and loaded.
@@ -0,0 +1,49 @@
THIS IS A WORK IN PROGRESS!
# MonoGame Documentation
This is the source for the [documentation published on MonoGame.net](http://www.monogame.net/documentation/). It is rebuilt when the code changes and is published nightly to the website.
## General Rules
The following rules must be observed at all times when contributing documentation to the MonoGame project.
- Write in a neutral, technical tone.
- Avoid humor, personal opinions, and colloquial language.
- **Never** plagiarize any documentation from another source.
- Do not use automatic documentation tools as they are ineffective.
Breaking these rules can result in your contribution being rejected.
## Getting Started
You can create and edit documentation right from the web browser without needing to install Git or ever leave the GitHub site.
- [Fork the MonoGame repo](https://help.github.com/articles/fork-a-repo/).
- [Create a new branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) from `develop` and make your changes only in that branch.
- [Create a new file](https://help.github.com/articles/creating-new-files/) or [edit an existing one](https://help.github.com/articles/editing-files-in-your-repository/) using the GitHub markup editor.
- [Submit pull requests](https://help.github.com/articles/creating-a-pull-request/) early and often to merge your documentation changes.
## Style Guide
Review the following expectations before contributing any documentation.
### Manuals, Guides, and Tutorials
TODO!
### API Reference
The API reference documentation is a big part of the documentation effort for MonoGame. The documentation is written in the [C# XML format](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments) and is inline to the MonoGame source code. The final web pages with API documentation are generated using [SharpDoc](https://github.com/xoofx/SharpDoc).
#### Every Word Should Contain Value
Every word in the reference documentation should provide information beyond the API itself. Documentation that only rehashes or rephrases what is already apparent in the class, method, parameter, or property name has zero value and wastes time for both the writer and reader.
#### The First Sentence Is The Most Important
There is no guarantee that the reader will read beyond the first sentence of the reference documentation. This is why that first sentence is the most important and should convey the most key piece of information. Take your time to write the most concise and clear first sentence possible. This helps users tremendously and goes a long way towards having great documentation.
#### Surface Information Hidden In the Code
Being inline with the code allows you to easily look for critical information within it that the user might not know from looking at the API alone. Take your time to explore inner method calls and platform specific sections of the code. The time to write the documentation is once you feel you fully understand the code you are documenting. If you don't feel you understand the code then leave the documentation for someone else to write.
#### Documentation Is Referenced Not Read
Remember that the user is searching for an answer for a specific question. It is your job to predict these questions and provide them clear answers.
## License
All documentation contributed to the MonoGame project is subject to the [Creative Commons Attribution-NonCommercial-ShareAlike](http://creativecommons.org/licenses/by-nc-sa/4.0/) license. By contributing you are agreeing to the terms of that license.
<p align="center"><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" property="dct:title" rel="dct:type">MonoGame Documentation</span> by the <a xmlns:cc="http://creativecommons.org/ns#" href="http://www.monogame.net" property="cc:attributionName" rel="cc:attributionURL">MonoGame Team</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike License</a>.</p>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,13 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
<iframe id="mainFrame" name="mainFrame" frameborder="0" scrolling="no" width="100%" height="100%"></iframe>
<script type="text/javascript" language="JavaScript">
loadContent("@Model.RootTopic.PageId", "@Param.FileExt");
</script>
@@ -0,0 +1,26 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model;
@Import("PageHead")
@Import("PageBody")
@helper Dump(string title, string bodyTemplateName)
{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
@Helpers.PageHead.Dump(title)
</head>
<body onload="onPageLoad('@title | MonoGame', '@Model.Topic.PageId');">
@Helpers.PageBody.Dump(bodyTemplateName)
<br />
<br />
</body>
</html>
}
@@ -0,0 +1,23 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@helper Dump(string bodyTemplateName)
{
<script type="text/javascript" language="javascript">
if(window == window.top)
location.href = "/documentation/?page=@Model.Topic.PageId";
document.addEvent('domready', function () {
InstallCodeTabs();
});
</script>
<div class="sharpdoc">
<div class="content">
@Include(bodyTemplateName)
</div>
</div>
}
@@ -0,0 +1,46 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@Import("PageHead")
@Import("TocBody")
@helper Dump(){
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
@Helpers.PageHead.Dump(Model.RootTopic.PageTitle)
</head>
<body>
@* Initialize splitpane *@
<script type="text/javascript" language="javascript">
document.addEvent('domready', function () {
SplitPane('toc_content', 'pane_toggle', 'pane_resizer');
});
</script>
<div class="sharpdoc">
<div id="body">
<div id="toc_content" class="toc_content">
<div class="inner">
@Helpers.TocBody.Dump()
<br />
<br />
</div>
</div>
<div id="pane_resizer" class="pane_resizer">
<div id="pane_toggle" class="collapse" ></div>
</div>
<div id="main_content" class="main_content">
@Include("ContentHeader")
@Include("MainFrame")
@Include("ContentFooter")
</div>
</div>
</div>
</body>
</html>
}
@@ -0,0 +1,52 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@Import("PageIndexBody")
<html>
<head>
<title>@Param.Title</title>
</head>
<body>
@if (Model.RootTopic != null)
{
NTopic indexTopic = new NTopic {PageId = "index"};
Model.Topic = indexTopic;
Model.WriteTo(indexTopic, @Helpers.PageIndexBody.Dump());
<script>
function resizeDocs()
{
var docFrame = document.getElementById('the_docs');
var tocDoc = docFrame.contentDocument || docFrame.contentWindow.document;
var contentFrame = tocDoc.getElementById('mainFrame');
var contentDoc = contentFrame.contentDocument || contentFrame.contentWindow.document;
var tocElem = tocDoc.getElementById('toc_content');
var tocSize = tocElem.scrollHeight ||
tocElem.offsetHeight ||
tocElem.clientHeight ||
0;
// The order here is very specifc to ensure it
// works on IE and Chrome with fallbacks.
var contentSize = contentDoc.documentElement.offsetHeight ||
contentDoc.body.scrollHeight ||
contentDoc.documentElement.scrollHeight ||
contentDoc.offsetHeight ||
contentDoc.documentElement.clientHeight ||
0;
var pageHeight = Math.max(contentSize, tocSize, 720);
docFrame.style.height = pageHeight + 'px';
}
</script>
<iframe id="the_docs" src="html/@indexTopic.PageId@Param.FileExt" frameborder="0" scrolling="no" width="100%" height="100%"></iframe>
}
</body>
</html>
@@ -0,0 +1,70 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@Import("Members")
@Import("Syntax")
@*
* ------------------------------------------------------------------
* Dump a section
* ------------------------------------------------------------------
* sectionId: id for the section
* name: display name
* content: html content of the section
* ------------------------------------------------------------------
*@
@helper Dump(string sectionId, string name, string content)
{
<script language="javascript">
window.addEvent('domready', function() {
$('@(sectionId)_toggle').addEvent('click', function (event) {
var ct = $('@(sectionId)_content');
if (ct.isDisplayed())
{
$('@(sectionId)_icon').setProperty('class', 'toggle_icon in');
$('@(sectionId)_content').hide();
}
else
{
$('@(sectionId)_icon').setProperty('class', 'toggle_icon out');
$('@(sectionId)_content').show();
}
});
});
</script>
<div id="@sectionId" class="section">
<div class="title"><a id="@(sectionId)_toggle" href="#" class="title"><div id="@(sectionId)_icon" class="toggle_icon out"></div><span class="title">@Escape(name)</span></a><div class="hr"><hr/></div></div>
<div id="@(sectionId)_content" class="block">
@Raw(content)
</div>
</div>
}
@helper Dump(string name, string content)
{
@Dump("section_" + name.Replace(" ",""), name, content)
}
@helper Dump(string sectionId, string name, IEnumerable<NModelBase> members, bool showIcons)
{
@Dump(sectionId, name, Helpers.Members.Dump(members, showIcons).ToString())
}
@helper Dump(string name, IEnumerable<NModelBase> members, bool showIcons)
{
@Dump(name, Helpers.Members.Dump(members, showIcons).ToString())
}
@helper Dump(string name, IEnumerable<NModelBase> members, bool showIcons, IModelReference context)
{
@Dump(name, Helpers.Members.Dump(members, showIcons, context).ToString())
}
@helper DumpSyntax(NMember member)
{
@Dump("Syntax", Helpers.Syntax.Dump(member).ToString())
}
@@ -0,0 +1,39 @@
@*
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
*@
@model SharpDoc.TemplateContext
@using SharpDoc.Model
@Import("SyntaxMethod")
@Import("SyntaxProperty")
@Import("TabCode")
@Import("SyntaxCodeCSharp")
@Import("SyntaxCodeVB")
@Import("SyntaxCodeFSharp")
@*// Dumps syntax section*@
@helper Dump(NMember member)
{
@Helpers.TabCode.Dump(new string[] {
"C#", "<pre class='brush: csharp;'>" + Escape(Helpers.SyntaxCodeCSharp.Dump(member)) + "</pre>",
"VB", Helpers.SyntaxCodeVB.Dump(member),
"F#", Helpers.SyntaxCodeFSharp.Dump(member),
});
if (member is NMethod)
{
@Helpers.SyntaxMethod.Dump((NMethod) member)
}
else if (member is NProperty)
{
@Helpers.SyntaxProperty.Dump((NProperty) member)
}
else if (member is NDelegate)
{
@Helpers.SyntaxMethod.Dump(((NDelegate) member).Invoke)
}
else if (member is NType)
{
<p>The @member.Name type exposes the following members.</p>
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

@@ -0,0 +1,322 @@
// Copyright (c) 2010-2013 SharpDoc - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// -------------------------------------------------------------------------------
// SplitPane handling Toc and Conent
// -------------------------------------------------------------------------------
// splitPaneId: id to the splitPane container
// splitPaneToggleId: id to the splitPane toggle collapse-expand button
// splitPaneResizerId: id to the resizer grip
function supports_local_storage() {
try {
return 'localStorage' in window && window['localStorage'] !== null && window.localStorage['getItem'] !== null;
} catch (e) {
return false;
}
}
function autoResize(id) {
if (document.getElementById) {
var newheight = "100%";
if (Browser.firefox || Browser.ie) {
newheight = (document.getElementById(id).contentWindow.document.body.scrollHeight) + "px";
}
document.getElementById(id).height = newheight;
}
}
function loadContent(rootTopic, extension) {
var data = window.top.location.search;
var url = rootTopic + extension;
var topicToHighlight = rootTopic;
if(data != null && data !="")
{
var pattern = /page=(\w+)/;
var page = pattern.exec(data);
if(page != null)
{
url = page[1] + extension;
topicToHighlight = page[1];
}
}
$("mainFrame").setAttribute("src", url);
hightLightTopic(topicToHighlight);
}
function onPageLoad(pageTitle, pageId)
{
var topWindow = window.top;
topWindow.resizeDocs();
topWindow.scrollTo(0,0);
topWindow.document.title = pageTitle;
topWindow.history.replaceState(null, pageTitle, '?page=' + pageId);
}
/*
http://webfreak.no/wp/2007/09/05/get-for-mootools-a-way-to-read-get-variables-with-javascript-in-mootools/
Function: $get
This function provides access to the "get" variable scope + the element anchor
Version: 1.3
Arguments:
key - string; optional; the parameter key to search for in the url's query string (can also be "#" for the element anchor)
url - url; optional; the url to check for "key" in, location.href is default
Example:
>$get("foo","http://example.com/?foo=bar"); //returns "bar"
>$get("foo"); //returns the value of the "foo" variable if it's present in the current url(location.href)
>$get("#","http://example.com/#moo"); //returns "moo"
>$get("#"); //returns the element anchor if any, but from the current url (location.href)
>$get(,"http://example.com/?foo=bar&bar=foo"); //returns {foo:'bar',bar:'foo'}
>$get(,"http://example.com/?foo=bar&bar=foo#moo"); //returns {foo:'bar',bar:'foo',hash:'moo'}
>$get(); //returns same as above, but from the current url (location.href)
>$get("?"); //returns the query string (without ? and element anchor) from the current url (location.href)
Returns:
Returns the value of the variable form the provided key, or an object with the current GET variables plus the element anchor (if any)
Returns "" if the variable is not present in the given query string
Credits:
Regex from [url=http://www.netlobo.com/url_query_string_javascript.html]http://www.netlobo.com/url_query_string_javascript.html[/url]
Function by Jens Anders Bakke, webfreak.no
*/
function $get(key, url) {
if (arguments.length < 2) url = location.href;
if (arguments.length > 0 && key != "") {
if (key == "#") {
var regex = new RegExp("[#]([^$]*)");
} else if (key == "?") {
var regex = new RegExp("[?]([^#$]*)");
} else {
var regex = new RegExp("[?&]" + key + "=([^&#]*)");
}
var results = regex.exec(url);
return (results == null) ? "" : results[1];
} else {
url = url.split("?");
var results = {};
if (url.length > 1) {
url = url[1].split("#");
if (url.length > 1) results["hash"] = url[1];
url[0].split("&").each(function (item, index) {
item = item.split("=");
results[item[0]] = item[1];
});
}
return results;
}
}
function InstallCodeTabs() {
var groupTabs = $$('.grouptab');
groupTabs.each(function (groupTab, groupIndex) {
var tabs = groupTab.getChildren('.tabs li.tab');
var content = groupTab.getChildren('.tabcontent');
tabs.each(function (tab, index) {
tab.addEvent('click', function () {
tabs.removeClass('selected');
content.removeClass('selected');
tabs[index].addClass('selected');
content[index].addClass('selected');
});
});
});
}
function SplitPane(splitPaneId, splitPaneToggleId, splitPaneResizerId) {
// Define column elemnts
var paneLeft = $(splitPaneId);
var paneRight = $("main_content");
var splitPaneResizer = $(splitPaneResizerId);
var splitPaneToggle = $(splitPaneToggleId);
var iframe = $('mainFrame');
var paneLeftMinWidth = 100;
var paneLeftOriginalWidth = paneLeft.getWidth();
splitPaneResizer.setStyle('left', paneLeftOriginalWidth + 3);
paneRight.setStyle('left', paneLeftOriginalWidth);
var splitPaneOriginalLeft = splitPaneResizer.getLeft();
var paneRightOriginalLeft = paneRight.getLeft();
// Use localstorage to store toggle state
if (supports_local_storage()) {
if (localStorage.getItem('sharpdoc-resize')) {
var value = localStorage.getItem('sharpdoc-resize');
if (value == 0) {
splitPaneToggle.set('class', 'expand');
paneLeft.setStyle('display', 'none');
}
paneLeft.setStyle('width', value);
}
}
// Snap size for resizer
var resizerSnap = 5;
// Make the left cell resizable
paneLeft.makeResizable({
handle: $(splitPaneResizerId),
grid: resizerSnap,
modifiers: { x: 'width', y: false },
limit: { x: [paneLeftMinWidth, null] },
onStart: function (el) {
// Disable pointer events on iframe while dragging
// otherwise we can't drag over the iframe
iframe.setStyle('pointer-events', 'none');
},
onComplete: function(el) {
// Enable back pointer events on iframe after dragging
// is complete
iframe.setStyle('pointer-events', 'auto');
},
onDrag: function (el) {
splitPaneResizer.setStyle('left', el.getWidth() + 3);
paneRight.setStyle('left', el.getWidth());
if (supports_local_storage()) {
localStorage.setItem('sharpdoc-resize', el.getWidth());
}
},
});
var topTitle = $$('h1.content-title');
var expandCollapseFunction = function (event) {
if (paneLeft.getWidth() < paneLeftMinWidth) {
splitPaneToggle.set('class', 'collapse');
paneLeft.setStyle('display', 'block');
// Morph the following values
paneLeft.morph({'width': paneLeftOriginalWidth,'opacity': '1'});
splitPaneResizer.morph({ 'left': splitPaneOriginalLeft + 12 }); // not sure why we need to add 12 to have a correct display
paneRight.morph({ 'left': paneRightOriginalLeft + 12});
if (supports_local_storage()) {
localStorage.removeItem('sharpdoc-resize');
}
} else {
splitPaneToggle.set('class', 'expand');
paneLeft.set('morph', { link: 'chain' }).morph({ 'width': '1', 'opacity': '0' }).morph({ 'display': 'none' });
splitPaneResizer.morph({ 'left': '1' });
paneRight.morph({ 'left': '1' });
if (supports_local_storage()) {
localStorage.setItem('sharpdoc-resize', 0);
}
}
};
// Handle toggle button collapse-expand events
splitPaneToggle.addEvent('click', expandCollapseFunction);
if (topTitle.length > 0) {
topTitle[0].addEvent('click', expandCollapseFunction);
}
}
function openToc(nodeId) {
//alert("open");
var node = $_(nodeId + "_toc");
var nodeClass = node.get('class');
if (nodeClass.indexOf('opened') == -1) {
var subNodes = $_(nodeId + "_SubTopics");
if (subNodes != undefined && subNodes.set != undefined)
subNodes.set('class', 'visible');
node.set('class', nodeClass.replace('closed', 'opened'));
}
var parent = node.getParent().id;
var pattern = /(\w+)_SubTopics/;
var parentId = pattern.exec(parent);
if (parentId != null)
openToc(parentId[1]);
else
window.top.resizeDocs();
}
function closeToc(nodeId) {
//alert("close");
var node = $_(nodeId + "_toc");
var nodeClass = node.get('class');
// The highlighten topic could not be closed
if (nodeClass.indexOf('highlighting') == -1) {
var subNodes = $_(nodeId + "_SubTopics");
if (subNodes != undefined && subNodes.set != undefined)
subNodes.set('class', 'hidden');
node.set('class', nodeClass.replace('opened', 'closed'));
}
else {
node.set('class', nodeClass.replace(' highlighting', ''));
}
window.top.resizeDocs();
}
function toggleToc(nodeId) {
//alert("toggle");
var node = $_(nodeId + "_toc");
var nodeClass = node.get('class');
if (nodeClass.indexOf('closed') != -1)
openToc(nodeId);
else
closeToc(nodeId);
}
function hightLightTopic(topicId) {
//alert("highlight");
var oldHighlight = $$_('.highlight');
oldHighlight.each(function (old, oldId) {
var oldClass = old.get('class');
old.set('class', oldClass.replace(' highlight', ''));
});
var newHightlight = $_(topicId + '_toc');
var newClass = newHightlight.get('class');
newHightlight.set('class', newClass + ' highlight highlighting');
openToc(topicId);
}
function $_(id) {
var element = $(id);
if (element == undefined)
element = window.parent.$(id);
return element;
}
function $$_(id) {
var elements = $$(id);
if (elements == undefined || elements.length == 0)
{
if (window.parent.$$ != undefined)
elements = window.parent.$$(id);
}
return elements;
}
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!--
MonoGame - Copyright (C) The MonoGame Team
This file is subject to the terms and conditions defined in
file 'LICENSE.txt', which is part of this source code package.
-->
<style xmlns="SharpDoc">
<name>MonoGame</name>
<description>MonoGame style for web publishing</description>
<inherit>Standard</inherit>
<param name="FileExt">.html</param>
<param name="ExternalLinkTarget">_top</param>
</style>
@@ -0,0 +1,43 @@
# Game class constructor
Due to some UWP implementation details, MonoGame has to construct your `Game` derived class by itself, using a static initializer `MonoGame.Framework.XamlGame<T>.Create(...)`.
In this situation, you have two main possibilities to create a `Game` derived class:
1. Let `XamlGame` initialize your `Game` derived class using the default constructor
2. Let `XamlGame` initialize your `Game` derived class using a custom constructor.
#### 1. XamlGame uses the default constructor
With this logic, it isn't possible to inject dependencies through the constructor since the default constructor is called:
`var game = new T();`
#### 2. XamlGame uses a custom constructor
Why may you need this constructor?
Consider `Game1` needs some dependencies such as an `ISettingsRepository` to get some values from each *platform* settings store. You would then implement an `AndroidSettingsRepository` and a `UwpSettingsRepository`, but you cannot construct those dependencies in `Game1` itself, **because they are platform dependent**, so you'll have to inject them into its constructor.
For example, in a `MainActivity` on Android you would do:
```csharp
_game = new Game1(
new AndroidTextFileImporter(Assets),
new AndroidSettingsRepository(this));
```
With the UWP implementation using `XamlGame` static initializer, you could do this:
```csharp
_game = MonoGame.Framework.XamlGame<Game1>.Create(
launchArguments,
Window.Current.CoreWindow,
swapChainPanel,
() => new Game1(
new UwpTextFileImporter(Assets),
new UwpSettingsRepository(this)));
```
In this way, you tell the static initializer **how** you'd like to construct `Game1`.
@@ -0,0 +1,43 @@
MonoGame supports more than one method of using fonts, the following is an explanation of how to use TrueType fonts.
#### Using TrueType Fonts with MonoGame
To be able to use a truetype font, MonoGame requires the truetype font file and a .spritefont file.
Truetype fonts may be installed on the system, or added to the project manually using your IDE in the same directory as the .spritefont file.
1. Create the .spritefont file.
<p>
<img src="images/adding_ttf_fonts_step_1.PNG"/>
</p>
<p>
<img src="images/adding_ttf_fonts_step_2.PNG"/>
</p>
2- Open the newly created .spritefont file in your text editor of choice, find this line and change it to your selected .ttf font.
If the font is installed on the system, just type the name of the font.
```xml
<FontName>Arial</FontName>
```
#### Usage Example
Make a class variable of type Spritefont
```csharp
SpriteFont font;
```
Load the font in the LoadContent function
```csharp
font = myGame.Content.Load<SpriteFont>("Fonts/myFont")
```
Draw any text in the Draw function
```csharp
spriteBatch.Begin();
// Finds the center of the string in coordinates inside the text rectangle
Vector2 textMiddlePoint = font.MeasureString(text) / 2;
// Places text in center of the screen
Vector2 position = new Vector2(myGame.Window.ClientBounds.Width / 2, myGame.Window.ClientBounds.Height / 2);
spriteBatch.DrawString(font, "MonoGame Font Test", position, Color.White, 0, textMiddlePoint, 1.0f, SpriteEffects.None, 0.5f)
spriteBatch.End();
```
If you want to know more, please refer to the [API Documentation]()
@@ -0,0 +1,60 @@
#
## Target Frameworks
Specifying the target Android versions can be confusing. MonoGame is built to target Android 4.2 (API Level 17), but can run on lower Android versions. If you build MonoGame from source, you will need the SDK Platform for API Level 17 installed in the Android SDK Manager.
Since MonoGame targets Android 4.2, the Target Framework in your Android project must be set to 4.2 or higher. To allow your game to run on lower Android versions, set the Minimum Android version to the desired version in the project properties.
### Visual Studio
There are three settings in the Application tab of the project properties to set the target Android versions.
`Compile using Android version` must be set to a minimum of `Android 4.2`. If you are using APIs available only in later Android versions, this must be set to the Android version that API became available or higher.
`Minimum Android to target` is set to the lowest Android version that you wish to support.
`Target Android version` is usually set to `Use Compile using SDK version`. This means to use the same value that we set the app to be built with. There is usually no reason to set this to any other value.
This is an example of a project set to build with the 4.4 SDK and target 4.0 as a minimum Android version.
<p align="center">
<img src="images/android_vs_target_frameworks.png"/>
</p>
### Xamarin Studio
Xamarin Studio has the same settings in the project options dialog. They are just in different places.
`Target framework` on the `General` page is the equivalent of Visual Studio's `Compile using Android version`.
<p align="center">
<img src="images/android_xs_target_framework.png"/>
</p>
On the `Android Application` page, you will find `Minimum Android version` (Visual Studio's `Minimum Android to target`) and `Target Android version` (same as Visual Studio).
<p align="center">
<img src="images/android_xs_minimum_framework.png"/>
</p>
## Android Manifest Requirements
### OpenGL ES 2.0 Support
MonoGame uses OpenGL ES 2.0. Google requires the following to be added to AndroidManifest.xml in order for the Market to hide the game from devices that do not have support for OpenGL ES 2.0.
```
<!-- Tell the system this app requires OpenGL ES 2.0. -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
```
### Texture Compression
The Market can also filter games by the types of texture compression they support. Add a ```
<supports-gl-texture> ``` node for each type of texture compression used in your game. See the [Android documentation](http://developer.android.com/guide/topics/manifest/supports-gl-texture-element.html) for further details on this node.
## References
[Such Android API Levels, Much Confuse. Wow.](http://redth.codes/such-android-api-levels-much-confuse-wow/) is a blog post by Redth going into more detail about setting the Android versions in a Xamarin project.
@@ -0,0 +1,117 @@
<?xml version="1.0"?>
<!--
MonoGame - Copyright (C) The MonoGame Team
This file is subject to the terms and conditions defined in
file 'LICENSE.txt', which is part of this source code package.
-->
<config xmlns="SharpDoc">
<title>MonoGame Documentation</title>
<style>MonoGame</style>
<output-dir>Output</output-dir>
<!-- Topics -->
<topic id="Welcome" page-id="main" name="MonoGame Documentation" filename="welcome.md">
<!-- Copy our images to the html/images folder -->
<resource>images</resource>
<topic id="Introduction" name="Introduction" filename="introduction.md">
<topic id="What_is_MonoGame" name="What is MonoGame" filename="what_is_monogame.md"/>
<topic id="System_Requirements" name="System Requirements" filename="system_requirements.md"/>
<topic id="Setting_Up_MonoGame" name="Setting Up MonoGame" filename="setting_up_monogame.md">
<topic id="Setting_Up_MonoGame_Windows" name="Windows" filename="setting_up_monogame_windows.md"/>
<topic id="Setting_Up_MonoGame_Mac" name="Mac" filename="setting_up_monogame_mac.md"/>
<topic id="Setting_Up_MonoGame_Linux" name="Linux" filename="setting_up_monogame_linux.md"/>
<topic id="Setting_Up_MonoGame_Source" name="From Source" filename="setting_up_monogame_source.md"/>
</topic>
<topic id="MonoGame_FAQ" name="MonoGame FAQ" filename="monogame_faq.md"/>
<topic id="Help_and_Support" name="Help and Support" filename="help_and_support.md"/>
</topic>
<topic id="Getting_Started" name="Getting Started" filename="getting_started/getting_started.md">
<topic id="creating_a_new_project" name="Creating a New Project" filename="getting_started/1_creating_a_new_project.md">
<topic id="creating_a_new_project_vs" name="Visual Studio" filename="getting_started/1_creating_a_new_project_vs.md"/>
<topic id="creating_a_new_project_md" name="MonoDevelop / Xamarin Studio" filename="getting_started/1_creating_a_new_project_md.md"/>
</topic>
<topic id="understanding_the_code" name="Understanding the Code" filename="getting_started/2_understanding_the_code.md"/>
<topic id="adding_content" name="Adding Content" filename="getting_started/3_adding_content.md"/>
<topic id="adding_basic_code" name="Adding Basic Code" filename="getting_started/4_adding_basic_code.md"/>
</topic>
<topic id="Tutorials" name="Tutorials" filename="tutorials.md"/>
<topic id="Adding_Art_Sounds_and_More" name="Adding Art, Sounds, and More" filename="content_intro.md">
<topic id="Using_The_Pipeline_Tool" name="Using The Pipeline Tool" filename="using_pipeline_tool.md"/>
<topic id="Custom_Effects" name="Custom Effects" filename="custom_effects.md"/>
<topic id="Using_TrueType_Fonts" name="Using TrueType Fonts" filename="adding_ttf_fonts.md"/>
<topic id="Localization" name="Localization" filename="localization.md" />
</topic>
<topic id="Tools" name="Tools" filename="tools.md">
<topic id="2MGFX" name="2MGFX" filename="2mgfx.md"/>
<topic id="MGCB" name="MGCB" filename="mgcb.md"/>
<topic id="Pipeline" name="Pipeline" filename="pipeline.md"/>
</topic>
<topic id="Platform_Specific_Notes" name="Platform-Specific Notes" filename="platform_specific.md">
<topic id="Android" name="Android" filename="android.md"/>
<topic id="tvOS" name="tvOS" filename="tvOS.md"/>
<topic id="UWP" name="UWP" filename="UWP.md"/>
</topic>
<topic id="External_Links" name="External Links" filename="links.md"/>
<topic id="Change_log" name="Change Log" filename="..\CHANGELOG.md"/>
<!-- Special topic X:ClassLibrary to include generated class library references. No filename to setup as it is generated -->
<topic id="X:ClassLibraryReference" page-id="api" name="Class Library Reference" index="100" on-url="true"/>
</topic>
<!-- List the assemblies to include for the class library-->
<!-- Windows Desktop -->
<group api="default|Windows DirectX Desktop">
<source>..\MonoGame.Framework\bin\Windows\AnyCPU\Release\MonoGame.Framework.dll</source>
<source>..\MonoGame.Framework.Content.Pipeline\bin\Windows\AnyCPU\Release\MonoGame.Framework.Content.Pipeline.dll</source>
</group>
<!-- Linux Desktop -->
<group api="linux|Linux Desktop">
<source>..\MonoGame.Framework\bin\Linux\AnyCPU\Release\MonoGame.Framework.dll</source>
<source>..\MonoGame.Framework.Content.Pipeline\bin\Linux\AnyCPU\Release\MonoGame.Framework.Content.Pipeline.dll</source>
</group>
<!-- MacOS Desktop -->
<!--
<group api="macos|MacOS Desktop">
<source>..\MonoGame.Framework\bin\MacOS\AnyCPU\Release\MonoGame.Framework.dll</source>
<source>..\MonoGame.Framework.Content.Pipeline\bin\MacOS\AnyCPU\Release\MonoGame.Framework.Content.Pipeline.dll</source>
</group>
-->
<!-- WindowsGL Desktop -->
<group api="wingl|Windows OpenGL Desktop">
<source>..\MonoGame.Framework\bin\WindowsGL\AnyCPU\Release\MonoGame.Framework.dll</source>
</group>
<!-- Web -->
<group api="web|Web">
<source>..\MonoGame.Framework\bin\Web\AnyCPU\Release\MonoGame.Framework.dll</source>
</group>
<!-- iOS -->
<!--
<group api="ios|iOS">
<source>..\MonoGame.Framework\bin\iOS\iPhoneSimulator\Release\MonoGame.Framework.dll</source>
</group>
-->
<!-- Android -->
<!--
<group api="android|Android">
<source>..\MonoGame.Framework\bin\Android\AnyCPU\Release\MonoGame.Framework.dll</source>
</group>
-->
</config>
@@ -0,0 +1,12 @@
A big part of your game is your content. This includes standard files like textures, sound effects, music, videos, and custom effects as well as custom content like level and enemy files.
MonoGame implements its own content pipeline for transforming your unoptimized assets into platform optimized content. This is critical in building a game which runs as fast as possible under tight resource constraints.
This section will cover the following topics:
- What is Game Content
- [Using The Pipeline Tool](using_pipeline_tool.md)
- [Using TrueType Fonts](adding_ttf_fonts.md)
- [Custom Effects](custom_effects.md)
- Custom Content Types
@@ -0,0 +1,75 @@
A core element of Microsoft XNA is the effect system which is used for all rendering.
For MonoGame we have the burden of supporting stock and custom effects for desktop GLSL, mobile GLSL, DirectX HLSL, and custom formats like that of the PlayStation Mobile. There currently is no effect system or shader language that supports all the platforms we require, forcing us to build a new custom effect system.
# MGFX
MGFX is MonoGame's own "FX" runtime and tools which with the following core goals:
* Support a similar technique, passes, shaders structure as Microsoft FX files.
* Have a textual format for ease of editing.
* Have a compiled and optimized binary format for runtime use.
* Be cross-platform and support multiple shader languages and bytecodes.
* Easy to extend for future platforms and features.
# Stock Effects
MonoGame has the following effects built-in and fully supported on current platforms:
* SpriteEffect
* BasicEffect
* AlphaTestEffect
* DualTextureEffect
* EnvironmentMapEffect
* SkinnedEffect
Under the hood these effects use the same system and tools as one would for a custom Effect. The source and pre-compiled versions of these effects can be found in the ['MonoGame.Framework\Graphics\Effect\Resources'](https://github.com/MonoGame/MonoGame/tree/develop/MonoGame.Framework/Graphics/Effect/Resources) folder.
If your game requires an extra little bit of performance you can easily hand edit the existing effects to remove unnecessary features or optimize for specific hardware and rebuild them with the MGFX tool.
# Custom Effects
To use a custom effect with MonoGame you must do one of the following (not both):
* Run the effect file through the [MonoGame Effect content processor](mgcb.md) for loading via the `ContentManager` (Recommended).
* Process your effect file with the [2MGFX tool](2mgfx.md) and load them yourself at runtime.
### Effect Writing Tips
These are some tips for writing or converting effects for use with MonoGame.
* The supported shader models when targeting DX are the following:
* `vs_4_0_level_9_1` and `ps_4_0_level_9_1`
* `vs_4_0_level_9_3` and `ps_4_0_level_9_3`
* `vs_4_0` and `ps_4_0` (requires `HiDef` `GraphicsProfile` at runtime)
* `vs_4_1` and `ps_4_1` (requires `HiDef` `GraphicsProfile` at runtime)
* `vs_5_0` and `ps_5_0` (requires `HiDef` `GraphicsProfile` at runtime)
* When targeting GL platforms we automatically translate FX files to GLSL using a library called [MojoShader](http://icculus.org/mojoshader/). The supported feature levels are the following:
* `vs_2_0` and `ps_2_0`
* `vs_3_0` and `ps_3_0`
* You can use preprocessor checks to add conditional code or compilation depending on defined symbols. MonoGame defines the following symbols when compiling effects:
* `2MGFX`
* `HLSL` and `SM4` for DirectX
* `OpenGL` and `GLSL` for OpenGL
As an example, you can conditionally set shader models depending on the platform with the following code:
```
#if OPENGL
#define VS_SHADERMODEL vs_3_0
#define PS_SHADERMODEL ps_3_0
#else
#define VS_SHADERMODEL vs_4_0_level_9_1
#define PS_SHADERMODEL ps_4_0_level_9_1
#endif
technique
{
pass
{
VertexShader = compile VS_SHADERMODEL MainVS();
PixelShader = compile PS_SHADERMODEL MainPS();
}
};
```
Custom symbols can be defined from the [Pipeline Tool](pipeline.md) or via [2MGFX](2mgfx.md).
* Make sure the pixel shaders inputs **exactly match** the vertex shader outputs so the parameters are passed in the correct registers. The parameters need to have the same size and order. Omitting parameters might not break compilation, but can cause unexpected results.
* Note that on GL platforms default values on Effect parameters do not work. Either set the parameter from code or use a real constant like a #define.
* The effect compiler is aggressive about removing unused parameters, be sure the parameters you are setting are actually used.
* Preshaders are not supported.
* If you think you've found a bug porting a shader [please let us know](https://github.com/MonoGame/MonoGame/issues).
@@ -0,0 +1,3 @@
This tutorial assumes that you have configured MonoGame correctly on your system, if you haven't, please read the [Setting Up MonoGame](setting_up_monogame.md).
Depending on the software you plan on using please follow either [Visual Studio](getting_started/1_creating_a_new_project_vs.md), or [VS for Mac / MonoDevelop](getting_started/1_creating_a_new_project_md.md) guide.
@@ -0,0 +1,21 @@
Start up MonoDevelop / Xamarin Studio and select **New...** in the upper left corner.
![New Solution](images/getting_started/1_new_soulution_md.png)
Now you should see a "New Project" dialog pop up. From here select **MonoGame > App** category, then select **MonoGame Cross Platform Desktop Project** and click **Next**.
![New Template](images/getting_started/1_template_dialog_md.png)
On the following dialog, type in the name that you wish to give your project. Do note that you should not use space character for it. For this tutorial, it will be named **ExampleGame**. After you've entered the name, click on the **Browse** button next to location text field, and select where you wish to save your project. Finally click **Create** to create a new project.
![New Project](images/getting_started/1_project_dialog_md.png)
If everything went correctly, you should see an **ExampleGame** project open up like in the picture bellow. To run your game simply press the big **Play Button** in the upper left corner or press **F5**.
![Run Game](images/getting_started/1_run_game_md.png)
You should now see your game window running.
![Game](images/getting_started/1_game_md.png)
Currently it's just clearing the surface with blue color. For further information on creating your game, please look at the [Understanding the Code](getting_started/2_understanding_the_code.md).
@@ -0,0 +1,17 @@
Start up Visual Studio and select **New Project...** in the upper left corner.
![New Solution](images/getting_started/1_new_soulution_vs.png)
Now you should see a "New Project" dialog pop up, from here select **Templates > Visual C# > MonoGame** category, and then select **MonoGame Cross Platform Desktop Project**. Next type in the name that you wish to give your project, for this tutorial let's just use **ExampleGame** (do note that you should not use space character for it). After you've entered the name, click on the **Browse** button next to the location text field, and select where you wish to save your project. Finally click **OK** to create a new project.
![New Template](images/getting_started/1_template_dialog_vs.png)
If everything went correctly, you should see an **ExampleGame** project open up like in the picture bellow. To run your game simply press the big **Play Button** in the toolbar or press **F5**.
![Run Game](images/getting_started/1_run_game_vs.png)
You should now see your game window running.
![Game](images/getting_started/1_game_vs.png)
Currently it's just clearing the surface with blue color. For further information on creating your game, please look at the [Understanding the Code](getting_started/2_understanding_the_code.md).
@@ -0,0 +1,103 @@
This file will go over the code that is getting created when you start a blank project. For help on creating a project please look at [Creating a New Project](getting_started/1_creating_a_new_project.md)
**Using Statements**
```csharp
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Input;
```
These using statements are required in order to use the code that MonoGame has to offer.
The reason why they start with Microsoft.Xna.Framework is because MonoGame is an open source implementation of Microsoft Xna framework, and in order to maintain compatibility with the XNA code, it is using the same namespaces.
**The Game1 Class**
```csharp
public class Game1 : Game
```
The main Game1 class is inheriting from the Game class, which provides all the core methods for your game (ie. Load/Unload Content, Update, Draw etc.). You usually have only one Game class per game so its name isn't that important.
**Instanced Variables**
```csharp
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
```
The two default variables that the blank template starts with are GraphicsDeviceManager and SpriteBatch. Both of these variables are used for drawing stuff as you will see in a later tutorial.
**Constructor**
```csharp
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
```
The main game constructor is used to initialize the starting variables. In this case we are creating a new GraphicsDeviceManager from our game, and are setting the folder which the game will search for content.
**Initialize Method**
```csharp
protected override void Initialize()
{
// TODO: Add your initialization logic here
base.Initialize();
}
```
This method is called after the constructor, but before the main game loop(Update/Draw). This is where you can query any required services and load any non-graphic related content.
**LoadContent Method**
```csharp
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
}
```
This method is used to load your game content. It is called only once per game, after Initialize method, but before the main game loop methods.
**Update Method**
```csharp
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
// TODO: Add your update logic here
base.Update(gameTime);
}
```
This method is called multiple times per second, and is used to update your game state (checking for collisions, gathering input, playing audio, etc.).
**Draw Method**
```csharp
protected override void Draw(GameTime gameTime)
{
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
// TODO: Add your drawing code here
base.Draw(gameTime);
}
```
Similar to the Update method, it is also called multiple times per second.
For the next part, look at [Adding Content](getting_started/3_adding_content.md) page.
@@ -0,0 +1,78 @@
This file will go over adding content to your game. For help on creating a project please look at [Creating a New Project](getting_started/1_creating_a_new_project.md)
First of all you are gonna need some content for your game. For this tutorial use the following image of a ball:
![Open Content](images/getting_started/ball.png)
Do **right-click > Save Image As** and save it somewhere with the name "ball.png".
Now open up your game project and look at the left. You should see a solution explorer window. Expand the **Content** folder and open up **Content.mgcb** file by double clicking on it.
![Open Content](images/getting_started/3_open_content.png)
You should now see a MonoGame Pipeline Tool window open up. In case it didn't get opened, you can right-click on **Content.mgcb**, select **open with** and then select **MonoGame Pipeline**.
![MonoGame Pipeline Tool](images/getting_started/3_pipeline_tool.png)
Your game content is managed from this external tool. You can add content to your game in one of the following ways:
- **Add Existing Item** toolbar button
- **Edit > Add > Existing Item...** menu button
- **right-click > Add > Existing Item...** context menu
In our case let's use the **Add Existing Item** toolbar button.
![Add Content](images/getting_started/3_add_content.png)
You should now be prompted to select a file. Select the "ball.png" that you have downloaded a moment ago. After that you will be asked on what action you want to do for adding the file. Just leave the it to default and click **OK**.
![Copy Content](images/getting_started/3_copy_content.png)
Now simply click **Save** toolbar button and close the tool.
![Save Content](images/getting_started/3_save_content.png)
Now that we have added the content, it's time to load it. First declare a new variable so we can load the ball image into memory.
```csharp
public class Game1 : Game
{
Texture2D textureBall;
GraphicsDeviceManager graphics;
```
Next find the Load Content method and use it to initialize the ball private variable:
```csharp
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
textureBall = Content.Load<Texture2D>("ball");
}
```
And finally, find the Draw method, and let's draw the ball onto the screen:
```csharp
protected override void Draw(GameTime gameTime)
{
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
// TODO: Add your drawing code here
spriteBatch.Begin();
spriteBatch.Draw(textureBall, new Vector2(0, 0), Color.White);
spriteBatch.End();
base.Draw(gameTime);
}
```
Now run the game and you should get the following:
![Game](images/getting_started/3_game.png)
For the next part, look at [Adding Basic Code](getting_started/4_adding_basic_code.md) page.
@@ -0,0 +1,111 @@
This file will go over adding basic logic to your game. Do note that this file continues where [Adding Content](getting_started/3_adding_content.md) tutorial left off.
First of all we need to add few new variables, one for position, and one for speed.
```csharp
public class Game1 : Game
{
Texture2D ballTexture;
Vector2 ballPosition;
float ballSpeed;
```
Next let's initialize them. Find the **Initialize** method and add the following lines.
```csharp
// TODO: Add your initialization logic here
ballPosition = new Vector2(graphics.PreferredBackBufferWidth / 2,
graphics.PreferredBackBufferHeight / 2);
ballSpeed = 100f;
base.Initialize();
```
With this we are putting our ball starting position to the center of the screen. Last thing we need to do is modify the position that the ball is getting drawn to. Find **Draw** method and modify the Draw call to:
```csharp
spriteBatch.Draw(ballTexture, ballPosition, Color.White);
```
Now run the game.
![Draw Ball 1](images/getting_started/4_ball_not_center.png)
As you can see the ball doesn't seem quite centered yet. This is happening because MonoGame uses (0, 0) as the origin point for drawing by default. We can modify this by doing the following:
```csharp
spriteBatch.Draw(
ballTexture,
ballPosition,
null,
Color.White,
0f,
new Vector2(ballTexture.Width / 2, ballTexture.Height / 2),
Vector2.One,
SpriteEffects.None,
0f
);
```
With this we are setting the origin to the center of the image. Now the image will get drawn to the center of the screen.
![Draw Ball 2](images/getting_started/4_ball_center.png)
Next let's setup some movement. Find the **Update** method and add:
```csharp
// TODO: Add your update logic here
var kstate = Keyboard.GetState();
if (kstate.IsKeyDown(Keys.Up))
ballPosition.Y -= ballSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds;
if(kstate.IsKeyDown(Keys.Down))
ballPosition.Y += ballSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds;
if (kstate.IsKeyDown(Keys.Left))
ballPosition.X -= ballSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds;
if(kstate.IsKeyDown(Keys.Right))
ballPosition.X += ballSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds;
base.Update(gameTime);
```
Let's discuss the code a bit.
With this we are getting the current keyboard state and just putting it into a variable.
```csharp
var kstate = Keyboard.GetState();
```
Next is just a simple check to see if the Up arrow key is pressed.
```csharp
if (kstate.IsKeyDown(Keys.Up))
```
And last is a simple code for moving the ball by **ballSpeed**. The reason why **ballSpeed** is getting multiplied by **gameTime.ElapsedGameTime.TotalSeconds** is because Update is not usually fixed, that is the time between update calls is not the same, so in order to get smooth movement we multiple speed by the time since the last update method was called.
```csharp
ballPosition.Y -= ballSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds;
```
The last 2 code parts repeat for Down, Left and Right arrow keys.
Run the game and you should be able to move the ball with the arrow keys. You will probably notice that you can get out of the window, so let's make it so that the ball can't escape the window. We will do this by setting bounds onto the ballPosition after it has already been moved.
```csharp
if(kstate.IsKeyDown(Keys.Right))
ballPosition.X += ballSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds;
ballPosition.X = Math.Min(Math.Max(ballTexture.Width / 2, ballPosition.X), graphics.PreferredBackBufferWidth - ballTexture.Width / 2);
ballPosition.Y = Math.Min(Math.Max(ballTexture.Height / 2, ballPosition.Y), graphics.PreferredBackBufferHeight - ballTexture.Height / 2);
base.Update(gameTime);
```
Now run the game and the ball won't be able to escape window bounds anymore.
Happy Coding ^^
@@ -0,0 +1,8 @@
This section walks you through the basics of MonoGame and help you create your first game.
- [Creating a New Project](getting_started/1_creating_a_new_project.md)
- [Visual Studio](getting_started/1_creating_a_new_project_vs.md)
- [MonoDevelop / Xamarin Studio](getting_started/1_creating_a_new_project_md.md)
- [Understanding the Code](getting_started/2_understanding_the_code.md)
- [Adding Content](getting_started/3_adding_content.md)
- [Adding Basic Code](getting_started/4_adding_basic_code.md)
@@ -0,0 +1,9 @@
This section will provide help and support for MonoGame.
## Help
If you wish to learn how to use MonoGame, please checkout our [Tutorials page](tutorials.md). If you want to find an answer to a more specific problem, you can ask it on our [Community page](http://community.monogame.net/).
## Bugs and New Feature Requests
If you find a bug or have a feature request, [please open a new issue](https://github.com/mono/monogame/issues). Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines).
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@@ -0,0 +1,10 @@
This section will give you an overview of MonoGame including, what it contains, development requirements, setup instructions, and additional links for help and support.
This section will cover the following topics:
- [What is MonoGame](what_is_monogame.md)
- [System Requirements](system_requirements.md)
- [Setting Up MonoGame](setting_up_monogame.md)
- [Getting Started](getting_started/getting_started.md)
- [MonoGame FAQ](monogame_faq.md)
- [Help and Support](help_and_support.md)
@@ -0,0 +1,9 @@
Links to several useful reference sites related to MonoGame.
- [Microsoft XNA Documentation](http://msdn.microsoft.com/en-us/library/bb203940.aspx)
- [OpenGL 4.3 Reference Card](http://www.khronos.org/files/opengl43-quick-reference-card.pdf)
- [OpenGL ES 2.0 Reference Card](http://www.khronos.org/opengles/sdk/docs/reference_cards/OpenGL-ES-2_0-Reference-card.pdf)
- [WebGL Reference Card](http://www.khronos.org/files/webgl/webgl-reference-card-1_0.pdf)
- [Collada Specification](http://www.khronos.org/collada/)
- [Valve's Guide to Porting to Linux](https://developer.nvidia.com/sites/default/files/akamai/gamedev/docs/Porting%20Source%20to%20Linux.pdf)
@@ -0,0 +1,150 @@
Localization is an important part of any game. While it can be possible to design a
game that is region independent, its quite hard. At some point you will need to
produce localized text and graphics.
MonoGame has a simple localization system built in. If you want to develop your own
system you are still able to do so. But the default system should be good enough for
most use cases.
# Creating resx files.
MonoGame runs on .net/Mono on most platforms. Localization is handled by those platforms
via the use of resx files. There are walkthroughs on [MSDN](https://msdn.microsoft.com/en-us/library/aa992030(v=vs.100).aspx)
which walk you through the process. A simplified version is presented here.
Create a .resx file in the IDE e.g Foo.resx and add it to your game project. Note this needs to be added to the
main app projects. The Foo.resx file should have an Action of EmbeddedResouce and a Generator value of ResXFileCodeGenerator.
There is a snippet from the .csproj
```xml
<EmbeddedResource Include="Foo.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Foo.Designer.cs</LastGenOutput>
</EmbeddedResource>
```
Add any string resources to that file. These are in the form of a Key/Value pair. You can use the built in editor
or manually edit the .resx file by hand. Its an xml file so you can view the contents easily.
```xml
<data name="Wall_Style" xml:space="preserve">
<value>Wall Style : {0}</value>
</data>
```
What happens when the resx is processed by the generator and produces a Foo.Designer.cs file which is then
included in your project. You can then access the "string" value by using code as follows
```csharp
var s = MyProject.Foo.Wall_Style;
```
Note in the example we have a place holder ({0}) for additional text. You can still use te property of Foo.Wall_Style with
things like string.Format.
```csharp
int i = 1;
var s = string.Format (MyProject.Foo.Wall_Style, i);
```
All this means you dont need to hard the string directly. When accessing MyProject.Foo.Wall_Style the code will lookup the value from
the embedded resx file.
You can add support for a new language by adding a new resx file which uses the language/region code e.g Foo.de-DE.resx.
This new file will contain the translations for that language/region. In the example we are targetting German.
## Universal Windows Platform (UWP) considerations.
Unfortunately UWP does not support resx files anymore. They have a new file called resw. The format is similar but
incompatible. As a result you will need to duplicate the data into a set of resw files to get the to work on UWP. The
process is like the standrd resx process.
# Upgrading your SpriteFont files
By default the SpriteFont processor uses a limited set of characters to generate the font. While this is fine for english
languages it would probably not include special characters needed for other languages (French, Arabic, Korean etc).
As a result MonoGame has a LocalizedFontProcessor which does something slightly different. The process looks at the resx
files you provide it with and generates an optimized spritefont which only contains the characters your game uses.
To make use of this functionality you ned to tell the spritefont which resx files to use. Open the .spritefont with a
xml/text editor and add lines like this inside the Asset node
```xml
<ResourceFiles>
<Resx>..\Foo.resx</Resx>
<Resx>..\Foo.de-DE.resx</Resx>
</ResourceFiles>
```
Note the paths are relative to the .spritefont directory. In the example above the resx files are in the directory
above the .spritefont.
You should end up with a .spritefont file like this
```xml
<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<FontName>Verdana</FontName>
<Size>14</Size>
<Spacing>1</Spacing>
<Style>Regular</Style>
<CharacterRegions>
<CharacterRegion>
<Start>&#32;</Start>
<End>&#32;</End>
</CharacterRegion>
</CharacterRegions>
<ResourceFiles>
<Resx>..\Foo.resx</Resx>
<Resx>..\Foo.de-DE.resx</Resx>
</ResourceFiles>
</Asset>
</XnaContent>
```
Once that is done you then need to change the .mgcb file so that the SpriteFontProcessor is replaced with
the LocalizedFontProcessor. This can be done by editing the .mgcb file or using the Pipeline tool. After
that you can just compile your content as normal. If the processor has any trouble resolving or reading the
resx files you will get an error.
# Loading the Font
Loading the font can be done in the normal way. The end result of the process is a .xnb file containing a normal
SpriteFont.
```csharp
var font = Content.Load<SpriteFont>("Foo");
```
# Other Localized assets
Not all localized assets will be fonts. In certain situtions you might need to swap out an entire texture or spritesheet.
For these cases a new method has been added to the ContentManager, LoadLocalized. The idea behind this method is that it will
look for localized files BEFORE loading the default one.
So for example say you have an asset, MyCharacter. You have a MyCharacter.xnb file which contains the data for that item. You
can also has a MyCharacter.de-DE.xnb file which contains the German version of that asset. This asset could be a Texture, Audio
or any other game asset. You can then use LoadLocalized to load the localized version of the asset.
```csharp
var myCharacter = Content.LoadLocalized<Texture2D>("MyCharacter");
```
The decision on which localized asset to load is made by looking for a file with the following patterns
```xml
<AssetName>.<CurrentCulture.Name>
<AssetName>.<CurrentCulture.TwoLetterISOLanguageName>
```
These values are retrieved from
```csharp
CultureInfo.CurrentCulture.Name // eg. "en-US"
CultureInfo.CurrentCulture.TwoLetterISOLanguageName // eg. "en"
```
which are part of the System.Globalization namespace. On a side note you can also use the `LoadLocalized` to load language
specific SpriteFonts. They just need to be named in the same way as we have described above.
@@ -0,0 +1,194 @@
The MonoGame Content Builder (MGCB.exe) is a command line tool for building XNB content on Windows, Mac, and Linux desktop systems.
Typically it is executed by the [Pipeline GUI tool](pipeline.md) when editing content or indirectly from VisualStudio or MonoDevelop during the build process of a MonoGame project. Alternatively you can use it yourself from the command line for specialized build pipelines or for debugging content processing.
## Command Line Options
The options are processed "left to right". When an option is repeated the last option always wins.
### Output Directory
```
/outputDir:<directory_path>
```
It specifies the directory where all content is written. If this option is omitted the output will be put into the current working directory.
### Intermediate Directory
```
/intermediateDir:<directory_path>
```
It specifies the directory where all intermediate files are written. If this option is omitted the intermediate data will be put into the current working directory.
### Rebuild Content
```
/rebuild
```
An optional parameter which forces a full rebuild of all content.
### Clean Content
```
/clean
```
Delete all previously built content and intermediate files. Only the `/intermediateDir` and `/outputDir` need to be defined for clean to do its job.
### Incremental Build
```
/incremental
```
Skip cleaning files not included in the current build. Useful for custom tools which only require a subset of the game content built.
### Assembly Reference
```
/reference:<assembly_path>
```
An optional parameter which adds an assembly reference which contains importers, processors, or writers needed during content building.
### Target Platform
```
/platform:<target_Platform>
```
Set the target platform for this build. It must be a member of the TargetPlatform enum:
* Windows
* iOS
* Android
* DesktopGL
* MacOSX
* WindowsStoreApp
* NativeClient
* PlayStation4
* WindowsPhone8
* RaspberryPi
* PSVita
* XboxOne
* Switch
If not set it will default to Windows.
NOTE: PlayStation 4, Xbox One, PS Vita, and Switch support is only available to licensed console developers.
### Target Graphics Profile
```
/profile:<graphics_Profile>
```
Set the target graphics profile for this build. It must be a member of the GraphicsProfile enum:
* HiDef
* Reach
If not set it will default to HiDef.
### Target Build Configuration
```
/config:<build_config>
```
The optional build configuration name from the build system. This is sometimes used as a hint in content processors.
### Content Compression
```
/compress
```
Uses LZ4 compression to compress the contents of the XNB files. Content build times will increase with this option enabled. Compression is not recommended for platforms such as Android, Windows Phone 8 and Windows 8 as the app package is already compressed. This is not compatible with LZX compression used in XNA content.
### Content Importer Name
```
/importer:<class_name>
```
An optional parameter which defines the class name of the content importer for reading source content. If the option is omitted or used without a class name the default content importer for the source type is used.
### Content Processor Name
```
/processor:<class_name>
```
An optional parameter which defines the class name of the content processor for processing imported content. If the option is omitted used without a class name the default content processor for the imported content is used.
Note that when you change the processor all previously defined `/processorParam` are cleared.
### Content Processor Parameter
```
/processorParam:<name>=<value>
```
An optional parameter which defines a parameter name and value to set on a content processor.
Note all defined processor parameters are cleared when the `/processor` is set.
### Build Content File
```
/build:<content_filepath>
/build:<content_filepath>;<destination_filepath>
```
Instructs the content builder to build the specified content file using the previously set switches and options. Optional destination path may be specified if you want to change the output filepath.
### Response File
```
/@:<response_filepath>
```
This defines a text response file (sometimes called a command file) that contains the same options and switches you would normally find on the command line.
Each switch is specified on a new line. Comment lines are prefixed with #. You can specify multiple response files or mix normal command line switches with response files.
An example response file could look like this:
```
# Directories
/outputDir:bin/foo
/intermediateDir:obj/foo
/rebuild
# Build a texture
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyEnabled=false
/build:Textures\wood.png
/build:Textures\metal.png
/build:Textures\plastic.png
```
### Launch Debugger
```
/launchdebugger
```
Allows a debugger to attach to the MGCB executable before content is built.
### Define Preprocessor Parameter
```
/define <name>=<value>
```
Sets or creates a preprocessor parameter with the given name and value.
### Preprocessor Macros
```
$if <name>=<value>
$endif
```
Preprocessor macros are intended to allow conditionals within a response file.
The preprocess step is what expands a response file command into its composite commands for each line in the file. However, a line is only emitted if all conditionals which contain the line evaluate true.
```
<example command line>
MGCB.exe /define:BuildEffects=No /@:example.mgcb
<example.mgcb file>
$if BuildEffects=Yes
/importer:EffectImporter
/processor:EffectProcessor
/build:Effects\custom.fx
# all other effects here....
$endif
```
### Customizing your Build Process
When building content from your project via `msbuild` there are a few ways to can hook into the build process. The `MonoGame.Content.Builder.targets` runs a target called
`BuildContent` just before your project builds. If you want to do any processing before or after this process you can use the `BeforeTargets` and `AfterTargets` mechanism provided
by `msbuild` to run your own targest.
```
<Target Name="MyBeforeTarget" BeforeTargets="BuildContent">
<Message Text="MyBeforeTarget Ran"/>
</Target>
<Target Name="MyAfterTarget" AfterTargets="BuildContent">
<Message Text="MyAfterTarget Ran"/>
</Target>
```
If you want to customise the arguements sent to the `MGCB.exe` as part of the build process you can use the `<MonoGameMGCBAdditionalArguments>` property to define those.
For example if you wanted to pass in the current project configuration you could define
```
<MonoGameMGCBAdditionalArguments>-config:$(Configuration)</MonoGameMGCBAdditionalArguments>
```
@@ -0,0 +1,11 @@
This page contains a list of frequently asked questions.
### What software do I need to start?
Depending on the platform you wish to develop for the following thing are needed:
- Android: [Xamarin.Android](https://docs.microsoft.com/en-us/xamarin/android/)
- iOS: [Xamarin.iOS](https://docs.microsoft.com/en-us/xamarin/ios/)
The linked pages will guide you through the setup process.
@@ -0,0 +1,23 @@
The MonoGame Pipeline Tool (Pipeline.exe) is the front-end GUI editor for MonoGame content builder projects.
<p align="center">
<img src="images/pipeline.png"/>
</p>
The Pipeline Tool has the following features:
* Create, open, and save MGCB projects.
* Import existing XNA .contentproj.
* Tree view showing content of project.
* Property grid for editing content settings.
* Full undo/redo support.
* Build, rebuild, and clean the project.
* Rebuild selected items.
* Create new content like fonts and xml.
* Support for custom importers/processors/writers.
* Template format for adding new custom content types.
The Pipeline Tool is included in the SDK installation.
[Read detailed documentation](using_pipeline_tool.md)
@@ -0,0 +1,5 @@
While MonoGame aims to provide a platform-agnostic framework for developing games and apps, there are still some specific for each platform that need the developer needs to be aware of. This section lists those specifics broken down by platform.
- [Android](android.md)
- [tvOS](tvOS.md)
- [Windows Universal Platform (UWP)](UWP.md)
@@ -0,0 +1,6 @@
This section will help you setup MonoGame on Platform of your choice. Please select the platform you wish to develop from:
- [Windows](setting_up_monogame_windows.md)
- [Mac](setting_up_monogame_mac.md)
- [Linux](setting_up_monogame_linux.md)
- [Building from source](setting_up_monogame_source.md)
@@ -0,0 +1,30 @@
This section will help you setup MonoGame on Linux.
### Running MonoGame Applications
The following packages are needed for the MonoGame Applications to run on Linux:
* libopenal-dev
* mono-runtime
For Ubuntu/Debian based Linux systems, you can run:
```
sudo apt-get install libopenal-dev mono-runtime
```
### Developing MonoGame Applications
* Go to [MonoGame Downloads page](http://www.monogame.net/downloads/)
* Download MonoGame for Linux
* Open up terminal and type in:
```
cd Downloads
chmod +x monogame-sdk.run
sudo ./monogame-sdk.run
```
* During the installation process the installer will give you the following list of dependencies, please make sure they are installed:
* monodevelop ([http://www.monodevelop.com/download/](http://www.monodevelop.com/download/))
* libopenal-dev
* gtk-sharp3
* referenceassemblies-pcl (needed to use PCL template)
* ttf-mscorefonts-installer (recommended, but not needed)
* That's it, MonoGame SDK is installed
@@ -0,0 +1,34 @@
This section will help you setup MonoGame on Mac OSX.
### Running MonoGame Applications
### Developing MonoGame Applications
Developing on the Mac requires a number of other frameworks and applications.
To get started you can use the Linux or DesktopGL platforms which will run quite happily
on MacOS providing you have mono installed.
So to get setup you will first need to install mono.
* Go to [Mono Downloads page](http://www.mono-project.com/download/)
* Download the latest Mac OS installer.
Note: If you are running El Capitan you will need to install the very latest mono otherwise things
will not work correctly.
You will also need Visual Studio for Mac
* Go to the [Visual Studio for Mac website](https://visualstudio.microsoft.com/vs/mac/)
* Download the installer.
This will install Visual Studio for Mac (which is free).
To setup MonoGame application development on mac OSX do the following:
* Go to [MonoGame Downloads page](http://www.monogame.net/downloads/)
* Click on the newest MonoGame release
* Download MonoGame for Mac
* Open the .pkg
* You will probably get an error about signing. If you do , right click and Open the .pkg file and you will be able to continue
* That's it, MonoGame is installed.
Make sure you install mono and Visual Studio for Mac first so that MonoGame can correctly setup the
project templates and addins.
@@ -0,0 +1,40 @@
This section will help you setup MonoGame by building it from source code.
### Prerequisites
Install the tools for the system you are building from:
* Windows:
* [Git for Windows](https://git-scm.com/download/win)
* [Visual Studio](https://www.visualstudio.com/)
* [Xamarin.Android](https://www.xamarin.com/download) (Optional)
* [Windows Phone 8 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=35471) (Optional)
* Mac:
* [Git](https://git-scm.com/download/mac)
* [Xamarin Studio](https://store.xamarin.com/)
* Xamarin.Android and Xamarin.iOS can be installed with the Xamarin Studio installer (Optional)
* Linux:
* [Git](https://git-scm.com/download/linux)
* [Monodevelop](http://www.monodevelop.com/download/linux/)
### Getting the source code
Start up a Terminal (Mac/Linux) or Git Bash (Windows) and clone the MonoGame repository:
```
git clone https://github.com/MonoGame/MonoGame.git
cd MonoGame
git submodule init
git submodule update
```
### Building from source
MonoGame uses [Protobuild](https://protobuild.org/) to generate project and solution files. Protobuild.exe will be in your MonoGame folder. To run Protobuild:
- On Windows run Protobuild.exe either by double-clicking or by executing it from the command line.
- On Mac/Linux open a terminal and run `mono Protobuild.exe` in the MonoGame folder.
Once the project and solution files are generated you can build them with the IDE you installed.
### Referencing the projects
First get the MonoGame SDK from the [downloads page](http://www.monogame.net/downloads/) and install it to get the IDE templates. Start up the IDE you have installed and create a new project from one of the templates. Click Add > Existing Project... on your solution and select the MonoGame.Framework project that matches the template (i.e. MonoGame.Framework.Windows.csproj for a MonoGame Windows project template). The project files are located in MonoGame/MonoGame.Framework. Delete the existing MonoGame.Framework reference and add a reference to the added project by clicking Add Reference... > Projects and selecting the project. You can run your game now. If you make changes to the MonoGame.Framework project it will automatically rebuild when running your game.
@@ -0,0 +1,20 @@
This section will help you setup MonoGame on Windows.
### Developing MonoGame Applications
You will need an IDE to develop MonoGame applications, the most common on Windows is Visual Studio.
* Go to the [Visual Studio website](https://visualstudio.microsoft.com/)
* Download a Visual Studio IDE, the Community edition is free for personal use.
* Run the installer and complete the installation.
Visual Studio is an IDE used to develop applications in, among other languages, C#. C# is the most common language used in MonoGame development.
After installing Visual Studio, do the following:
* Go to [MonoGame Downloads page](http://www.monogame.net/downloads/)
* Click on the newest MonoGame release
* Download MonoGame for Visual Studio
* Run the installer
* You will probably get an error from Windows Defender due to the install file not being digitally signed. If you do, click "More info" and then "Run anyway" to continue the installation.
* That's it, MonoGame is installed.
You are now ready to develop MonoGame applications using Visual Studio. The next time you open Visual Studio you will find a list of MonoGame template projects ready to use.
@@ -0,0 +1,16 @@
This section will give you an overview of minimal system requirements for developing and running MonoGame Applications.
### Development
* Windows -
* Linux - 1 GB Ram
* Mac -
### Running MonoGame Application on specific Platform
* WindowsDX - DirectX 9.0c capable gpu
* WindowsGL -
* Linux - 512 MB Ram
* Mac -
* Android - Android 4.2 or higher
* iOS -
* Windows Phone - Windows Phone 10
@@ -0,0 +1,4 @@
This section explains the various command line tools that are part of MonoGame.
- [2MGFX](2mgfx.md) is used to compile stand alone effects.
- [MGCB](mgcb.md) is used to build content pipeline content.
@@ -0,0 +1,50 @@
Links to various tutorials and articles to help you get started with MonoGame.
### RB Whitaker's MonoGame Tutorials
- [1 - C# Crash Course](http://rbwhitaker.wikidot.com/c-sharp-tutorials)
- [2 - Getting started](http://rbwhitaker.wikidot.com/monogame-getting-started-tutorials)
- [3 - 2D tutorials](http://rbwhitaker.wikidot.com/monogame-2d-tutorials)
- [4 - 3D tutorials](http://rbwhitaker.wikidot.com/monogame-3d-tutorials)
- [Extra - XNA tutorials](http://rbwhitaker.wikidot.com/xna-tutorials)
### Microsoft
Tara Walker's "Building a Shooter Game" tutorial series.
- [Part 1: Overview, Installation, MonoGame 3.0 Project Creation](http://blogs.msdn.com/b/tarawalker/archive/2012/12/04/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-1-overview-installation-monogame-3-0-project-creation.aspx)
- [Part 2: Creating the Shooter/Player Asset of the Game](http://blogs.msdn.com/b/tarawalker/archive/2012/12/10/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-2-creating-the-shooter-player-asset-of-the-game.aspx)
- [Part 3: Updating Graphics using Content Pipeline with MonoGame](http://blogs.msdn.com/b/tarawalker/archive/2013/01/04/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-3-updating-graphics-using-content-pipeline-with-monogame.aspx)
- [Part 4: Adding and Processing Player (User) Input](http://blogs.msdn.com/b/tarawalker/archive/2013/02/23/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-4-adding-and-processing-player-user-input.aspx)
- [Part 5: Animating the Player/Ship and Creating a Parallaxing Background](http://blogs.msdn.com/b/tarawalker/archive/2013/04/12/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-5-animating-the-player-ship-and-creating-a-parallaxing-background.aspx)
- [Part 6: Creating Enemies and Detecting Collisions](http://blogs.msdn.com/b/tarawalker/archive/2013/08/26/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-6-creating-enemies-and-detecting-collisions.aspx)
- [Part 7: Creating Projectiles and Detecting Collisions](http://chrisongames.blogspot.com/2014/12/windows-8-game-development-using-c-xna.html)
- [Part 8: Creating Explosions using Sprite Animations](http://chrisongames.blogspot.com/2015/02/windows-8-game-development-using-c-xna.html)
- [Part 9: Adding Sound Effects and Game Music](http://chrisongames.blogspot.com/2015/12/windows-810-game-development-using-c.html)
### Neil Danson's F# series
- [Part 1 - MacOS](http://neildanson.wordpress.com/2013/07/30/f-and-monogame/)
- [Part 2 - Android](http://neildanson.wordpress.com/2013/07/31/f-and-monogame-part-2-android/)
- [Part 3 - iOS](http://neildanson.wordpress.com/2013/07/31/f-and-monogame-part-3-ios/)
- [Part 4 - Content Pipeline](http://neildanson.wordpress.com/2013/08/13/f-and-monogame-part-4-content-pipeline/)
### Others
- [How to create animations and sprite sheets for MonoGame](https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-and-animations-with-monogame)
- [Making a platformer in F# with MonoGame](http://bruinbrown.wordpress.com/2013/10/06/making-a-platformer-in-f-with-monogame/)
- [XNA 4.0 Shader Programming / HLSL](http://digitalerr0r.wordpress.com/tutorials/)
- [Using Spine with MonoGame - by Randolph Burt (Randeroo)](http://randolphburt.co.uk/2013/03/30/dragons-and-dancing-crabs/)
- [Mac porting series](http://benkane.wordpress.com/2012/01/20/the-great-porting-adventure-day-8/)
- [Porting a Windows Phone 7 Game to Android](http://warrenburch.blogspot.co.uk/2011/12/porting-windows-phone-7-game-to-android.html)
- [A series on embedding MonoGame/WinGL into WinForms](http://jaquadro.com/2013/03/bringing-your-xna-winforms-controls-to-monogame-opengl/)
- [French articles about MonoGame on Linux, Windows and Windows 8](http://www.demonixis.net/blog/category/tutoriels/tuto-xna/)
- [Dark Genesis Blog](http://darkgenesis.zenithmoon.com/tag/monogame/)
- [MonoGame "Hello World" on Mac OS X and Xamarin Studio](http://jaquadro.com/2013/09/monogame-hello-world-on-mac-os-x-and-xamarin-studio/)
- [Solving Resolution Independent Rendering And 2D Camera Using Monogame](http://blog.roboblob.com/2013/07/27/solving-resolution-independent-rendering-and-2d-camera-using-monogame/)
- [XNA is Dead; Long Live the New XNA, MonoGame](http://www.codemag.com/Article/1411081)
- [Make Santa Jump - Making an endless runner game in F# using MonoGame](http://timjones.tw/blog/archive/2014/12/28/make-santa-jump-game-in-fsharp-using-monogame)
- [Running MonoGame on Android Wear](http://crossplatform.io/running-monogame-on-android-wear/)
## Video Tutorials
- [CodingMadeEasy RPG Tutorial](http://www.youtube.com/watch?feature=player_embedded&v=agt9-J9RPZ0)
- [Psuedo Games Tutorials](http://www.youtube.com/watch?feature=player_embedded&v=BwtQn02oy6A)
- [Desenvolvendo jogos multiplataforma em C# com MonoGame - Alexandre Chohfi (Portuguese)](http://channel9.msdn.com/Blogs/MSDN-Brasil-Cursos-de-Desenvolvimento/Desenvolvendo-jogos-multiplataforma-em-C-com-MonoGame)
- [Desenvolvimento de jogos para Windows 8 com XNA - Alexandre Chohfi (Portuguese)](https://www.youtube.com/watch?v=gM5pRnYV1tA)

Some files were not shown because too many files have changed in this diff Show More