diff --git a/hexworld/Util/VBO.cs b/Diamond/Buffers/VBO.cs similarity index 96% rename from hexworld/Util/VBO.cs rename to Diamond/Buffers/VBO.cs index 05fddfa..b89b7c9 100644 --- a/hexworld/Util/VBO.cs +++ b/Diamond/Buffers/VBO.cs @@ -1,12 +1,10 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; +using Diamond.Shaders; using OpenTK.Graphics.OpenGL4; -namespace hexworld.Util +namespace Diamond.Buffers { public static class VBO { diff --git a/hexworld/Util/VertexPointerAttribute.cs b/Diamond/Buffers/VertexPointerAttribute.cs similarity index 96% rename from hexworld/Util/VertexPointerAttribute.cs rename to Diamond/Buffers/VertexPointerAttribute.cs index 0892757..b4dbfdd 100644 --- a/hexworld/Util/VertexPointerAttribute.cs +++ b/Diamond/Buffers/VertexPointerAttribute.cs @@ -1,7 +1,7 @@ using System; using OpenTK.Graphics.OpenGL4; -namespace hexworld.Util +namespace Diamond.Buffers { [AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = true)] public sealed class VertexPointerAttribute : Attribute diff --git a/Diamond/Diamond.csproj b/Diamond/Diamond.csproj new file mode 100644 index 0000000..3ba5464 --- /dev/null +++ b/Diamond/Diamond.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {59761EB7-87E1-4FF1-808A-18B7BFFF602E} + Library + Properties + Diamond + Diamond + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hexworld/Util/GLObject.cs b/Diamond/GLObject.cs similarity index 80% rename from hexworld/Util/GLObject.cs rename to Diamond/GLObject.cs index dff5769..37013c7 100644 --- a/hexworld/Util/GLObject.cs +++ b/Diamond/GLObject.cs @@ -1,11 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using OpenTK.Graphics.OpenGL4; -namespace hexworld.Util +namespace Diamond { public abstract class GLObject : IDisposable { diff --git a/Diamond/OpenTK.dll.config b/Diamond/OpenTK.dll.config new file mode 100644 index 0000000..7098d39 --- /dev/null +++ b/Diamond/OpenTK.dll.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Diamond/Properties/AssemblyInfo.cs b/Diamond/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4d0cd71 --- /dev/null +++ b/Diamond/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Diamond")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Diamond")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("59761eb7-87e1-4ff1-808a-18b7bfff602e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/hexworld/Util/Program.cs b/Diamond/Shaders/Program.cs similarity index 97% rename from hexworld/Util/Program.cs rename to Diamond/Shaders/Program.cs index 0a97f41..181658f 100644 --- a/hexworld/Util/Program.cs +++ b/Diamond/Shaders/Program.cs @@ -1,9 +1,8 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Text; using OpenTK.Graphics.OpenGL4; -namespace hexworld.Util +namespace Diamond.Shaders { public class Program : GLObject { diff --git a/hexworld/Util/Shader.cs b/Diamond/Shaders/Shader.cs similarity index 91% rename from hexworld/Util/Shader.cs rename to Diamond/Shaders/Shader.cs index 99d53bf..8e6fcaa 100644 --- a/hexworld/Util/Shader.cs +++ b/Diamond/Shaders/Shader.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.IO; using System.Text; -using System.Threading.Tasks; using OpenTK.Graphics.OpenGL4; -using System.IO; -namespace hexworld.Util +namespace Diamond.Shaders { public class Shader : GLObject { diff --git a/hexworld/Util/ShaderException.cs b/Diamond/Shaders/ShaderException.cs similarity index 95% rename from hexworld/Util/ShaderException.cs rename to Diamond/Shaders/ShaderException.cs index d5d99ef..76de65c 100644 --- a/hexworld/Util/ShaderException.cs +++ b/Diamond/Shaders/ShaderException.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace hexworld.Util +namespace Diamond.Shaders { [Serializable] public class ShaderException : Exception diff --git a/hexworld/Util/Texture.cs b/Diamond/Textures/Texture.cs similarity index 92% rename from hexworld/Util/Texture.cs rename to Diamond/Textures/Texture.cs index 98a6d4e..d3df8a2 100644 --- a/hexworld/Util/Texture.cs +++ b/Diamond/Textures/Texture.cs @@ -1,14 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Drawing; +using System.Drawing; using System.Drawing.Imaging; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using OpenTK.Graphics.OpenGL4; using PixelFormat = OpenTK.Graphics.OpenGL4.PixelFormat; -namespace hexworld.Util +namespace Diamond.Textures { public class Texture : GLObject { diff --git a/Diamond/packages.config b/Diamond/packages.config new file mode 100644 index 0000000..74325d8 --- /dev/null +++ b/Diamond/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hexworld.sln b/hexworld.sln index a5c18e4..7670840 100644 --- a/hexworld.sln +++ b/hexworld.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.26206.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hexworld", "hexworld\hexworld.csproj", "{AD9ED057-FB47-44CB-8839-22924B409706}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diamond", "Diamond\Diamond.csproj", "{59761EB7-87E1-4FF1-808A-18B7BFFF602E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {AD9ED057-FB47-44CB-8839-22924B409706}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD9ED057-FB47-44CB-8839-22924B409706}.Release|Any CPU.ActiveCfg = Release|Any CPU {AD9ED057-FB47-44CB-8839-22924B409706}.Release|Any CPU.Build.0 = Release|Any CPU + {59761EB7-87E1-4FF1-808A-18B7BFFF602E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59761EB7-87E1-4FF1-808A-18B7BFFF602E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59761EB7-87E1-4FF1-808A-18B7BFFF602E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59761EB7-87E1-4FF1-808A-18B7BFFF602E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/hexworld/HexRender.cs b/hexworld/HexRender.cs index 2306ac5..a02376d 100644 --- a/hexworld/HexRender.cs +++ b/hexworld/HexRender.cs @@ -4,7 +4,10 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Security.Policy; -using hexworld.Util; +using Diamond; +using Diamond.Buffers; +using Diamond.Shaders; +using Diamond.Textures; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using OpenTK; diff --git a/hexworld/VertexData.cs b/hexworld/VertexData.cs index 522487d..819a274 100644 --- a/hexworld/VertexData.cs +++ b/hexworld/VertexData.cs @@ -4,7 +4,8 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; -using hexworld.Util; +using Diamond; +using Diamond.Buffers; using Newtonsoft.Json; using OpenTK; diff --git a/hexworld/hexworld.csproj b/hexworld/hexworld.csproj index 968dad6..273820e 100644 --- a/hexworld/hexworld.csproj +++ b/hexworld/hexworld.csproj @@ -55,13 +55,6 @@ - - - - - - - @@ -88,5 +81,11 @@ Always + + + {59761eb7-87e1-4ff1-808a-18b7bfff602e} + Diamond + + \ No newline at end of file