Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
231ab34
Merge branch 'master' of https://github.com/RHY3756547/FSOMonoGame in…
riperiperi Nov 16, 2015
40c4761
Merge pull request #1 from mono/develop
riperiperi Feb 8, 2016
b088e01
Implement DynamicSoundEffectInstance
polsys Apr 3, 2016
8c874cc
Do not use nameof
polsys Apr 3, 2016
5f41cfb
Fix MonoMac usings
polsys Apr 3, 2016
9f8915e
WeakReference in DynamicSoundEffectInstanceManager
polsys Apr 8, 2016
f6e36c3
Test DynamicSoundEffectInstance threading behavior
polsys Apr 8, 2016
6f8781d
Fix OpenAL version to pass new tests
polsys Apr 8, 2016
95c9379
Fix XAudio version to pass the new tests
polsys Apr 8, 2016
c702579
Move DynamicSoundEffectInstanceManager
polsys Apr 9, 2016
1f36f11
Merge branch 'develop' into DynamicSoundEffectInstance
polsys Apr 11, 2016
9998838
Merge branch 'develop' into DynamicSoundEffectInstance
polsys Apr 20, 2016
b6db682
Merge pull request #2 from mono/develop
riperiperi May 26, 2016
596e3ab
Merge pull request #3 from polsys/DynamicSoundEffectInstance
riperiperi May 26, 2016
a9a2838
[FSO] Fix some minor issues.
riperiperi May 28, 2016
82acf11
Merge remote-tracking branch 'refs/remotes/mono/develop' into develop
riperiperi Jun 12, 2016
8c54970
Fix Dependencies
riperiperi Jun 12, 2016
36bca57
Actually fix conflicts
riperiperi Jun 12, 2016
2437346
Merge branch 'develop' into pr/5
riperiperi Aug 12, 2016
b8405e6
Merge pull request #6 from RHY3756547/pr/5
riperiperi Aug 12, 2016
1cbf678
Quick patch to fix x86
riperiperi Aug 12, 2016
b226a43
[FSO] Support DepthStencil inherit
riperiperi Aug 20, 2016
ef29a1b
Include TextEvent structures in iOS/Android.
riperiperi Aug 28, 2016
ad2528c
Greatly improve GraphicsResource Dispose performance.
riperiperi Aug 30, 2016
97cfe7d
Merge remote-tracking branch 'refs/remotes/MonoGame/develop' into dev…
riperiperi Oct 27, 2016
8a4b478
Fix for better Mac support
Bengrs Dec 18, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Build/Projects/MonoGame.Framework.definition
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
<Platforms>Windows8,WindowsPhone81</Platforms>
</Compile>
<Compile Include="TextInputEventArgs.cs">
<Platforms>Angle,Linux,MacOS,Windows,WindowsGL,WindowsUniversal</Platforms>
<Platforms>Android,Angle,iOS,Linux,MacOS,Windows,WindowsGL,WindowsUniversal</Platforms>
</Compile>
<Compile Include="Threading.cs">
<Platforms>Android,Angle,iOS,Linux,MacOS,Ouya,WindowsGL,WindowsPhone,tvOS</Platforms>
Expand Down
6 changes: 3 additions & 3 deletions MonoGame.Framework/Graphics/GraphicsDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private bool PixelShaderDirty
// Use WeakReference for the global resources list as we do not know when a resource
// may be disposed and collected. We do not want to prevent a resource from being
// collected by holding a strong reference to it in this list.
private readonly List<WeakReference> _resources = new List<WeakReference>();
private readonly HashSet<WeakReference> _resources = new HashSet<WeakReference>();

// TODO Graphics Device events need implementing
public event EventHandler<EventArgs> DeviceLost;
Expand Down Expand Up @@ -479,7 +479,7 @@ protected virtual void Dispose(bool disposing)
// Dispose of all remaining graphics resources before disposing of the graphics device
lock (_resourcesLock)
{
foreach (var resource in _resources.ToArray())
foreach (var resource in (new List<WeakReference>(_resources)).ToArray())
{
var target = resource.Target as IDisposable;
if (target != null)
Expand Down Expand Up @@ -570,7 +570,7 @@ internal void OnDeviceResetting()
}

// Remove references to resources that have been garbage collected.
_resources.RemoveAll(wr => !wr.IsAlive);
_resources.RemoveWhere(wr => !wr.IsAlive);
}
}

Expand Down
6 changes: 6 additions & 0 deletions MonoGame.Framework/Graphics/RenderTarget2D.DirectX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,11 @@ DepthStencilView IRenderTarget.GetDepthStencilView()
GenerateIfRequired();
return _depthStencilView;
}

public void InheritDepthStencil(RenderTarget2D from)
{
if (from == null) _depthStencilView = GraphicsDevice._depthStencilView;
else _depthStencilView = from._depthStencilView;
}
}
}
12 changes: 12 additions & 0 deletions MonoGame.Framework/Graphics/RenderTarget2D.OpenGL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,17 @@ protected override void Dispose(bool disposing)

base.Dispose(disposing);
}

public void InheritDepthStencil(RenderTarget2D from)
{
if (from == null)
{
//must use other method
} else
{
((IRenderTarget)this).GLDepthBuffer = ((IRenderTarget)from).GLDepthBuffer;
((IRenderTarget)this).GLStencilBuffer = ((IRenderTarget)from).GLStencilBuffer;
}
}
}
}
8 changes: 6 additions & 2 deletions MonoGame.Framework/MacOS/MacGamePlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ public override void EnterFullScreen()
if (oldTitle != null)
_gameWindow.Title = oldTitle;

_mainWindow.IsVisible = false;
//FIX: see https://github.com/MonoGame/MonoGame/pull/4286
//_mainWindow.IsVisible = false;

// FIXME: EnterFullScreen gets called very early and interferes
// with Synchronous mode, so disabling this for now.
// Hopefully this does not cause excessive havoc.
Expand Down Expand Up @@ -356,7 +358,9 @@ public override void ExitFullScreen()
// Set the level here to normal
_mainWindow.Level = NSWindowLevel.Normal;

_mainWindow.IsVisible = false;
//FIX: see https://github.com/MonoGame/MonoGame/pull/4286
//_mainWindow.IsVisible = false;

// FIXME: EnterFullScreen gets called very early and interferes
// with Synchronous mode, so disabling this for now.
// Hopefully this does not cause excessive havoc.
Expand Down
2 changes: 1 addition & 1 deletion Tools/2MGFX/ShaderData.mojo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public static ShaderData CreateGLSL(byte[] byteCode, bool isVertexShader, List<C

// Add the required precision specifiers for GLES.

var floatPrecision = dxshader.IsVertexShader ? "precision highp float;\r\n" : "precision mediump float;\r\n";
var floatPrecision = dxshader.IsVertexShader ? "precision highp float;\r\n" : "precision highp float;\r\n";

glslCode = "#ifdef GL_ES\r\n" +
floatPrecision +
Expand Down