Created Diamond.Util, added SubArray and adjusted references.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Diamond.Util;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
|
||||
namespace Diamond.Buffers
|
||||
@@ -30,7 +31,7 @@ namespace Diamond.Buffers
|
||||
GL.BufferData(Target, (IntPtr) (size * data.Length), data, Usage);
|
||||
}
|
||||
|
||||
public void SubData<T>(SubArray<T> data) where T : struct
|
||||
public void SubData(SubArray<T> data)
|
||||
{
|
||||
var size = Marshal.SizeOf<T>();
|
||||
Bind();
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Buffers\GLBuffer.cs" />
|
||||
<Compile Include="Buffers\SubArray.cs" />
|
||||
<Compile Include="Util\SubArray.cs" />
|
||||
<Compile Include="Buffers\VertexDataAttribute.cs" />
|
||||
<Compile Include="GLObject.cs" />
|
||||
<Compile Include="Level\Level.cs" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Diamond.Buffers;
|
||||
using Diamond.Shaders;
|
||||
using Diamond.Util;
|
||||
|
||||
namespace Diamond.Level
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Diagnostics.PerformanceData;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Diamond.Buffers;
|
||||
using Diamond.Util;
|
||||
using Newtonsoft.Json;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Diamond.Buffers
|
||||
namespace Diamond.Util
|
||||
{
|
||||
public class SubArray<T> : IEnumerable<T>
|
||||
{
|
||||
Reference in New Issue
Block a user