Skip to content

Commit

Permalink
Merge pull request sharpdx#613 from jwollen/master
Browse files Browse the repository at this point in the history
[Direct3D11] Fixed interop in SetScissorRectangles
  • Loading branch information
xoofx committed Jul 11, 2015
2 parents 3e13554 + 78995af commit 7dbcf7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/SharpDX.Direct3D11/DeviceContext.RasterizerStage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public T[] GetScissorRectangles<T>() where T : struct
/// <unmanaged-short>ID3D11DeviceContext::RSGetScissorRects</unmanaged-short>
public unsafe void GetScissorRectangles<T>(T[] scissorRectangles) where T : struct
{
if (Utilities.SizeOf<T>() != Utilities.SizeOf<RawViewportF>())
throw new ArgumentException("Type T must have same size and layout as RawRectangle", "viewports");
if (Utilities.SizeOf<T>() != Utilities.SizeOf<RawRectangle>())
throw new ArgumentException("Type T must have same size and layout as RawRectangle", "scissorRectangles");

int numRects = scissorRectangles.Length;
void* pBuffer = Interop.Fixed(scissorRectangles);
Expand Down Expand Up @@ -140,7 +140,7 @@ public void SetScissorRectangles<T>(params T[] scissorRectangles) where T : stru

unsafe
{
void* pBuffer = Interop.Fixed(ref scissorRectangles);
void* pBuffer = Interop.Fixed(scissorRectangles);
SetScissorRects(scissorRectangles == null ? 0 : scissorRectangles.Length, (IntPtr)pBuffer);
}
}
Expand Down

0 comments on commit 7dbcf7a

Please sign in to comment.