mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
- remove unsafe keyword from functions no longer needing it
This commit is contained in:
parent
1ef7d4a267
commit
7abcb2a328
2 changed files with 6 additions and 6 deletions
|
@ -8,11 +8,11 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
{
|
||||
internal class Mesh : IDisposable
|
||||
{
|
||||
unsafe public Mesh(RenderDevice graphics, WorldVertex[] vertexData, int[] indexData)
|
||||
public Mesh(RenderDevice graphics, WorldVertex[] vertexData, int[] indexData)
|
||||
{
|
||||
graphics.SetBufferData(Vertices, vertexData);
|
||||
graphics.SetBufferData(Indices, indexData);
|
||||
Count = indexData.Length;
|
||||
PrimitivesCount = indexData.Length / 3;
|
||||
}
|
||||
|
||||
~Mesh()
|
||||
|
@ -24,7 +24,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
{
|
||||
device.SetVertexBuffer(Vertices);
|
||||
device.SetIndexBuffer(Indices);
|
||||
device.DrawIndexed(PrimitiveType.TriangleList, 0, Count / 3);
|
||||
device.DrawIndexed(PrimitiveType.TriangleList, 0, PrimitivesCount);
|
||||
device.SetIndexBuffer(null);
|
||||
device.SetVertexBuffer(null);
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
|
||||
VertexBuffer Vertices = new VertexBuffer();
|
||||
IndexBuffer Indices = new IndexBuffer();
|
||||
int Count;
|
||||
int PrimitivesCount;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -608,7 +608,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
#region ================== Start / Finish
|
||||
|
||||
// This begins a drawing session
|
||||
public unsafe bool StartPlotter(bool clear)
|
||||
public bool StartPlotter(bool clear)
|
||||
{
|
||||
if(renderlayer != RenderLayers.None)
|
||||
{
|
||||
|
@ -769,7 +769,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
}
|
||||
|
||||
// This renders all grid
|
||||
private unsafe void RenderBackgroundGrid()
|
||||
private void RenderBackgroundGrid()
|
||||
{
|
||||
// Do we need to redraw grid?
|
||||
if(lastgridsize != General.Map.Grid.GridSizeF || lastgridscale != scale ||
|
||||
|
|
Loading…
Reference in a new issue