.
This commit is contained in:
19
DoomDeathmatch/Assets/test.shader
Normal file
19
DoomDeathmatch/Assets/test.shader
Normal file
@@ -0,0 +1,19 @@
|
||||
#shader vertex
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0) in vec2 aPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(aPos, 0.0, 1.0);
|
||||
}
|
||||
|
||||
#shader fragment
|
||||
#version 330 core
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(1.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
21
DoomDeathmatch/DoomDeathmatch.csproj
Normal file
21
DoomDeathmatch/DoomDeathmatch.csproj
Normal file
@@ -0,0 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Engine\Engine.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Serilog" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Enrichers.Thread" Version="4.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="8.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
20
DoomDeathmatch/Program.cs
Normal file
20
DoomDeathmatch/Program.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace DoomDeathmatch;
|
||||
|
||||
internal abstract class Program
|
||||
{
|
||||
[DllImport("kernel32.dll")]
|
||||
static extern IntPtr GetConsoleWindow();
|
||||
|
||||
[DllImport("User32.dll", SetLastError = true)]
|
||||
public static extern IntPtr GetDC(IntPtr hwnd);
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var engine = new Engine.Engine(1280, 720, false, "Doom Deathmatch");
|
||||
engine.Run();
|
||||
}
|
||||
}
|
||||
21
DoomDeathmatch/QuadVertex.cs
Normal file
21
DoomDeathmatch/QuadVertex.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Engine.Renderer.Buffer.Vertex;
|
||||
using OpenTK.Graphics.OpenGL;
|
||||
using OpenTK.Mathematics;
|
||||
using Half = System.Half;
|
||||
|
||||
namespace DoomDeathmatch;
|
||||
|
||||
public struct QuadVertex : IVertex
|
||||
{
|
||||
[Vertex(VertexAttribType.Float, 2)]
|
||||
public Vector2 Position2;
|
||||
|
||||
[Vertex(VertexAttribType.Float, 2)]
|
||||
public Vector2 Position;
|
||||
|
||||
[Vertex(VertexAttribType.Float, 2)]
|
||||
public Vector2 Position4;
|
||||
|
||||
[Vertex(VertexAttribType.Float, 2)]
|
||||
public Vector2 Position3;
|
||||
}
|
||||
Reference in New Issue
Block a user