diff --git a/InstanceTiles/App.config b/InstanceTiles/App.config deleted file mode 100644 index bae5d6d..0000000 --- a/InstanceTiles/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/InstanceTiles/InstanceTiles.csproj b/InstanceTiles/InstanceTiles.csproj deleted file mode 100644 index cfcf1e3..0000000 --- a/InstanceTiles/InstanceTiles.csproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Debug - AnyCPU - {282D9C70-9531-4960-A84B-E314D68DABFF} - Exe - InstanceTiles - InstanceTiles - v4.6.1 - 512 - true - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - 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/InstanceTiles/OpenTK.dll.config b/InstanceTiles/OpenTK.dll.config deleted file mode 100644 index 7098d39..0000000 --- a/InstanceTiles/OpenTK.dll.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/InstanceTiles/Program.cs b/InstanceTiles/Program.cs deleted file mode 100644 index e8d0d73..0000000 --- a/InstanceTiles/Program.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using OpenTK; - -namespace InstanceTiles -{ - internal class Program - { - private float[] points = - { - +.5f, +.5f, +.5f, -.5f, +.5f, +.5f, -.5f, -.5f, +.5f, - -.5f, -.5f, +.5f, +.5f, -.5f, +.5f, +.5f, +.5f, +.5f, - -.5f, +.5f, -.5f, +.5f, +.5f, -.5f, +.5f, -.5f, -.5f, - +.5f, -.5f, -.5f, -.5f, -.5f, -.5f, -.5f, +.5f, -.5f, - +.5f, +.5f, -.5f, +.5f, +.5f, +.5f, +.5f, -.5f, +.5f, - +.5f, -.5f, +.5f, +.5f, -.5f, -.5f, +.5f, +.5f, -.5f, - -.5f, +.5f, +.5f, -.5f, +.5f, -.5f, -.5f, -.5f, -.5f, - -.5f, -.5f, -.5f, -.5f, -.5f, +.5f, -.5f, +.5f, +.5f, - +.5f, +.5f, -.5f, -.5f, +.5f, -.5f, -.5f, +.5f, +.5f, - -.5f, +.5f, +.5f, +.5f, +.5f, +.5f, +.5f, +.5f, -.5f, - +.5f, -.5f, +.5f, -.5f, -.5f, +.5f, -.5f, -.5f, -.5f, - -.5f, -.5f, -.5f, +.5f, -.5f, -.5f, +.5f, -.5f, +.5f, - }; - - private float[] texCoords = - { - 1.0f, 0.0f, 5.0f, 0.0f, 5.0f, 1.0f, - 0.5f, 1.0f, 1.0f, 1.0f, 1.0f, 5.0f, - 1.0f, 0.5f, 0.0f, 0.5f, 0.0f, 1.0f, - 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.5f, - 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.5f, - 0.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.5f, - 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.5f, 0.5f, 0.5f, 0.5f, 0.0f, - 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f, - 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f, - 0.0f, 0.5f, 0.5f, 0.5f, 0.5f, 0.0f, - }; - - private float[] cubePoints = - { - 0, 0, 0, - 1, 0, 0, - 0, 1, 0, - }; - - private float[] cubeTexCoords = - { - 0.05f - }; - - private static void Main(string[] args) - { - - } - } -} \ No newline at end of file diff --git a/InstanceTiles/Properties/AssemblyInfo.cs b/InstanceTiles/Properties/AssemblyInfo.cs deleted file mode 100644 index 5195eb1..0000000 --- a/InstanceTiles/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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("InstanceTiles")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("InstanceTiles")] -[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("282d9c70-9531-4960-a84b-e314d68dabff")] - -// 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/InstanceTiles/packages.config b/InstanceTiles/packages.config deleted file mode 100644 index 74325d8..0000000 --- a/InstanceTiles/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/hexworld.sln b/hexworld.sln index 7f56b50..a5c18e4 100644 --- a/hexworld.sln +++ b/hexworld.sln @@ -5,8 +5,6 @@ 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}") = "InstanceTiles", "InstanceTiles\InstanceTiles.csproj", "{282D9C70-9531-4960-A84B-E314D68DABFF}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -17,10 +15,6 @@ 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 - {282D9C70-9531-4960-A84B-E314D68DABFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {282D9C70-9531-4960-A84B-E314D68DABFF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {282D9C70-9531-4960-A84B-E314D68DABFF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {282D9C70-9531-4960-A84B-E314D68DABFF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/hexworld/App.config b/hexworld/App.config index bae5d6d..8d23437 100644 --- a/hexworld/App.config +++ b/hexworld/App.config @@ -1,6 +1,6 @@ - + diff --git a/hexworld/Driver.cs b/hexworld/Driver.cs index 69aacd5..a6db25f 100644 --- a/hexworld/Driver.cs +++ b/hexworld/Driver.cs @@ -11,7 +11,7 @@ namespace hexworld { public static void Main(string[] args) { - using (var gw = new HexWindow(1920, 1080)) + using (var gw = new HexWindow(1280, 720)) { gw.Run(); } diff --git a/hexworld/Game.cs b/hexworld/Game.cs index 31c6356..c000e0e 100644 --- a/hexworld/Game.cs +++ b/hexworld/Game.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading.Tasks; using hexworld.Util; using OpenTK; +using OpenTK.Graphics; using OpenTK.Graphics.OpenGL4; using PixelFormat = OpenTK.Graphics.OpenGL4.PixelFormat; @@ -37,23 +38,35 @@ namespace hexworld private readonly Vert[] _verts = { // +X - new Vert(+.5f, +.5f, -.5f, 1.0f, 0.5f), new Vert(+.5f, +.5f, +.5f, 1.0f, 0.0f), new Vert(+.5f, -.5f, +.5f, 0.5f, 0.0f), - new Vert(+.5f, -.5f, +.5f, 0.5f, 0.0f), new Vert(+.5f, -.5f, -.5f, 0.5f, 0.5f), new Vert(+.5f, +.5f, -.5f, 1.0f, 0.5f), + new Vert(+.5f, +.5f, -.5f, 1.0f, 0.5f), new Vert(+.5f, +.5f, +.5f, 1.0f, 0.0f), + new Vert(+.5f, -.5f, +.5f, 0.5f, 0.0f), + new Vert(+.5f, -.5f, +.5f, 0.5f, 0.0f), new Vert(+.5f, -.5f, -.5f, 0.5f, 0.5f), + new Vert(+.5f, +.5f, -.5f, 1.0f, 0.5f), // -X - new Vert(-.5f, +.5f, +.5f, 0.5f, 0.0f), new Vert(-.5f, +.5f, -.5f, 0.5f, 0.5f), new Vert(-.5f, -.5f, -.5f, 1.0f, 0.5f), - new Vert(-.5f, -.5f, -.5f, 1.0f, 0.5f), new Vert(-.5f, -.5f, +.5f, 1.0f, 0.0f), new Vert(-.5f, +.5f, +.5f, 0.5f, 0.0f), + new Vert(-.5f, +.5f, +.5f, 0.5f, 0.0f), new Vert(-.5f, +.5f, -.5f, 0.5f, 0.5f), + new Vert(-.5f, -.5f, -.5f, 1.0f, 0.5f), + new Vert(-.5f, -.5f, -.5f, 1.0f, 0.5f), new Vert(-.5f, -.5f, +.5f, 1.0f, 0.0f), + new Vert(-.5f, +.5f, +.5f, 0.5f, 0.0f), // +Y - new Vert(+.5f, +.5f, -.5f, 0.5f, 0.5f), new Vert(-.5f, +.5f, -.5f, 1.0f, 0.5f), new Vert(-.5f, +.5f, +.5f, 1.0f, 0.0f), - new Vert(-.5f, +.5f, +.5f, 1.0f, 0.0f), new Vert(+.5f, +.5f, +.5f, 0.5f, 0.0f), new Vert(+.5f, +.5f, -.5f, 0.5f, 0.5f), + new Vert(+.5f, +.5f, -.5f, 0.5f, 0.5f), new Vert(-.5f, +.5f, -.5f, 1.0f, 0.5f), + new Vert(-.5f, +.5f, +.5f, 1.0f, 0.0f), + new Vert(-.5f, +.5f, +.5f, 1.0f, 0.0f), new Vert(+.5f, +.5f, +.5f, 0.5f, 0.0f), + new Vert(+.5f, +.5f, -.5f, 0.5f, 0.5f), // -Y - new Vert(+.5f, -.5f, +.5f, 1.0f, 0.0f), new Vert(-.5f, -.5f, +.5f, 0.5f, 0.0f), new Vert(-.5f, -.5f, -.5f, 0.5f, 0.5f), - new Vert(-.5f, -.5f, -.5f, 0.5f, 0.5f), new Vert(+.5f, -.5f, -.5f, 1.0f, 0.5f), new Vert(+.5f, -.5f, +.5f, 1.0f, 0.0f), + new Vert(+.5f, -.5f, +.5f, 1.0f, 0.0f), new Vert(-.5f, -.5f, +.5f, 0.5f, 0.0f), + new Vert(-.5f, -.5f, -.5f, 0.5f, 0.5f), + new Vert(-.5f, -.5f, -.5f, 0.5f, 0.5f), new Vert(+.5f, -.5f, -.5f, 1.0f, 0.5f), + new Vert(+.5f, -.5f, +.5f, 1.0f, 0.0f), // +Z - new Vert(+.5f, +.5f, +.5f, 0.5f, 0.0f), new Vert(-.5f, +.5f, +.5f, 0.0f, 0.0f), new Vert(-.5f, -.5f, +.5f, 0.0f, 0.5f), - new Vert(-.5f, -.5f, +.5f, 0.0f, 0.5f), new Vert(+.5f, -.5f, +.5f, 0.5f, 0.5f), new Vert(+.5f, +.5f, +.5f, 0.5f, 0.0f), + new Vert(+.5f, +.5f, +.5f, 0.5f, 0.0f), new Vert(-.5f, +.5f, +.5f, 0.0f, 0.0f), + new Vert(-.5f, -.5f, +.5f, 0.0f, 0.5f), + new Vert(-.5f, -.5f, +.5f, 0.0f, 0.5f), new Vert(+.5f, -.5f, +.5f, 0.5f, 0.5f), + new Vert(+.5f, +.5f, +.5f, 0.5f, 0.0f), // -Z - new Vert(+.5f, +.5f, -.5f, 0.5f, 0.5f), new Vert(-.5f, +.5f, -.5f, 0.0f, 0.5f), new Vert(-.5f, -.5f, -.5f, 0.0f, 1.0f), - new Vert(-.5f, -.5f, -.5f, 0.0f, 1.0f), new Vert(+.5f, -.5f, -.5f, 0.5f, 1.0f), new Vert(+.5f, +.5f, -.5f, 0.5f, 0.5f), + new Vert(+.5f, +.5f, -.5f, 0.5f, 0.5f), new Vert(-.5f, +.5f, -.5f, 0.0f, 0.5f), + new Vert(-.5f, -.5f, -.5f, 0.0f, 1.0f), + new Vert(-.5f, -.5f, -.5f, 0.0f, 1.0f), new Vert(+.5f, -.5f, -.5f, 0.5f, 1.0f), + new Vert(+.5f, +.5f, -.5f, 0.5f, 0.5f), }; private Matrix4 _view = Matrix4.Identity; @@ -65,8 +78,14 @@ namespace hexworld private Texture _tex2; public HexWindow(int width, int height) - : base(width, height) + : base( + width, height, GraphicsMode.Default, "Hexworld", GameWindowFlags.Default, DisplayDevice.Default, 4, 4, + GraphicsContextFlags.Debug) { + GL.GetInteger(GetPName.MajorVersion, out int major); + GL.GetInteger(GetPName.MinorVersion, out int minor); + Console.Out.WriteLine($"GL {major}.{minor}"); + Width = width; Height = height; X = (DisplayDevice.Default.Width - Width) / 2; diff --git a/hexworld/hexworld.csproj b/hexworld/hexworld.csproj index 5be51dd..076b8d0 100644 --- a/hexworld/hexworld.csproj +++ b/hexworld/hexworld.csproj @@ -8,7 +8,7 @@ Exe hexworld hexworld - v4.6.1 + v4.6.2 512 true