Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomspilman committed Jul 6, 2024
1 parent b6a7322 commit 7bb79bf
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private void PlatformDirty()

internal void PlatformSetSamplers(GraphicsDevice device)
{
if (_applyToVertexStage && !device.GraphicsCapabilities.SupportsVertexTextures)
if (_stage == ShaderStage.Vertex && !device.GraphicsCapabilities.SupportsVertexTextures)
return;

// Skip out if nothing has changed.
Expand All @@ -37,7 +37,7 @@ internal void PlatformSetSamplers(GraphicsDevice device)
// NOTE: We make the assumption here that the caller has
// locked the d3dContext for us to use.
SharpDX.Direct3D11.CommonShaderStage shaderStage;
if (_applyToVertexStage)
if (_stage == ShaderStage.Vertex)
shaderStage = device._d3dContext.VertexShader;
else
shaderStage = device._d3dContext.PixelShader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ void PlatformInit()

internal void ClearTargets(GraphicsDevice device, RenderTargetBinding[] targets)
{
if (_applyToVertexStage && !device.GraphicsCapabilities.SupportsVertexTextures)
if (_stage == ShaderStage.Vertex && !device.GraphicsCapabilities.SupportsVertexTextures)
return;

if (_applyToVertexStage)
if (_stage == ShaderStage.Vertex)
ClearTargets(targets, device._d3dContext.VertexShader);
else
ClearTargets(targets, device._d3dContext.PixelShader);
Expand Down Expand Up @@ -59,7 +59,7 @@ void PlatformSetTextures(GraphicsDevice device)
// NOTE: We make the assumption here that the caller has
// locked the d3dContext for us to use.
SharpDX.Direct3D11.CommonShaderStage shaderStage;
if (_applyToVertexStage)
if (_stage == ShaderStage.Vertex)
shaderStage = device._d3dContext.VertexShader;
else
shaderStage = device._d3dContext.PixelShader;
Expand Down
12 changes: 12 additions & 0 deletions MonoGame.Framework/Platform/WindowsUniversal/UAPGameWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ partial class UAPGameWindow : GameWindow

#region Public Properties

public override Point Position
{
get
{
return Point.Zero;
}

set
{
}
}

public override IntPtr Handle { get { return Marshal.GetIUnknownForObject(_coreWindow); } }

public override string ScreenDeviceName { get { return String.Empty; } } // window.Title
Expand Down
18 changes: 15 additions & 3 deletions MonoGame.Framework/Platform/iOS/iOSGameWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ void HandleInterfaceOrientationChanged (object sender, EventArgs e)
OnOrientationChanged();
}

#region GameWindow Members
#region GameWindow Members

public override bool AllowUserResizing {
public override Point Position
{
get
{
return Point.Zero;
}

set
{
}
}

public override bool AllowUserResizing {
get { return false; }
set { /* Do nothing. */ }
}
Expand Down Expand Up @@ -120,4 +132,4 @@ protected override void SetTitle (string title)

#endregion GameWindow Members
}
}
}

0 comments on commit 7bb79bf

Please sign in to comment.