Compare commits

27 Commits

Author SHA1 Message Date
max
09089c35b9 Test with generated hooks 2024-09-08 20:58:13 +02:00
max
bd76fc1b25 start working on assembly loader
to be used with the generated assemblies from the user code.
2024-07-25 22:59:11 +02:00
max
d80cc51aff naming 2024-07-25 22:58:07 +02:00
max
ad2f527de5 naming 2024-07-24 23:53:37 +02:00
max
b4c3b5ed18 naming 2024-07-24 21:40:10 +02:00
max
b9f5a4c56b renamed some files and structure 2024-07-23 22:31:19 +02:00
max
50a77d5120 default values 2024-07-21 22:40:16 +02:00
max
91672d5760 Merge remote-tracking branch 'origin/main' into project 2024-07-21 22:34:32 +02:00
max
546b7feca7 project and solution generation 2024-07-21 22:31:04 +02:00
max
36a134170a editor project
yes
2024-07-21 14:03:40 +02:00
max
6e41c2579c started working on compiler project
the idea of the compiler project is to have a tool that generates and compiles the solution + csproj files for the project. This is then used by the editor or via the command line.
2024-07-21 04:38:31 +02:00
max
2afbd9defe Generate solution file 2024-07-20 00:46:08 +02:00
max
6f505f34a9 Unload resources before destroying device. 2024-07-20 00:45:16 +02:00
max
f978c49532 start working on project generation 2024-07-19 15:24:50 +02:00
92cf24fe9f - Added resource manager
- Shader building now inspects the spir-v for descriptor sets and writes the info to the output binary
2024-07-13 13:45:12 +02:00
cce6e00960 - Merge 2024-07-12 23:11:47 +02:00
1096597161 - Fixed bug in builder when no content files exist 2024-07-12 23:10:44 +02:00
d45f7c3b8c - Fixed bug in builder when no content files exist 2024-07-12 23:08:52 +02:00
max
7a81026ca5 Merge remote-tracking branch 'origin/ImGui' 2024-07-12 19:51:41 +02:00
max
60b85960ff EditorGui setup 2024-07-12 19:09:59 +02:00
max
b003ffbaec Merge branch 'main' into ImGui 2024-07-12 18:08:28 +02:00
max
777059489c updated project structure 2024-07-12 17:59:06 +02:00
max
16b04ea22a Editor dummy code 2024-07-12 17:27:01 +02:00
dd3bbf1d5b - Re-added win libs 2024-07-11 23:48:45 +02:00
38080703ec - Deleted ignored folders 2024-07-11 23:47:43 +02:00
fe582c4fba - Added build configurations
- Configured csprojects
- CopyLibs functionality in builder
2024-07-11 23:46:32 +02:00
97c2b308f1 Added builder
Added shader importer
2024-07-06 23:33:04 +02:00
80 changed files with 2158 additions and 1026 deletions

9
.gitignore vendored
View File

@ -451,8 +451,13 @@ FodyWeavers.xsd
#------------------------- Nerfed -------------------------
Bin/
Intermediate/
imgui.ini
# include libs
!/libs/lib64
!/libs/x64
!/Native/lib64
!/Native/x64

View File

@ -2,5 +2,11 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Nerfed.Runtime/Libraries/FAudio" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Nerfed.Runtime/Libraries/ImGui.NET" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Nerfed.Runtime/Libraries/RefreshCS" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Nerfed.Runtime/Libraries/SDL2CS" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Nerfed.Runtime/Libraries/WellspringCS" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Nerfed.Runtime/Libraries/dav1dfile" vcs="Git" />
</component>
</project>

7
Directory.Build.props Normal file
View File

@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<OutDir>../Bin/$(MSBuildProjectName)</OutDir>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">../Intermediate/$(MSBuildProjectName)</BaseIntermediateOutputPath>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,129 @@
using System.Collections;
using System.ComponentModel;
using System.Reflection;
namespace Nerfed.Builder;
public class ArgsParser<TArgs> where TArgs : new()
{
private enum ArgType
{
None,
Key,
Value
}
public TArgs Arguments { get; }
private readonly string[] args;
private readonly Dictionary<string, PropertyInfo> argKeyPropertyMap = new Dictionary<string, PropertyInfo>();
public ArgsParser(string[] args)
{
this.args = args;
Arguments = new TArgs();
PropertyInfo[] properties = Arguments.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
foreach (PropertyInfo property in properties)
{
ArgumentAttribute argAttribute = property.GetCustomAttribute<ArgumentAttribute>();
if (argAttribute == null || string.IsNullOrEmpty(argAttribute.ArgKey))
{
continue;
}
argKeyPropertyMap.Add(argAttribute.ArgKey, property);
}
}
public bool Parse()
{
PropertyInfo property = null;
ArgType lastArgType = ArgType.None;
for (int i = 0; i < args.Length; i++)
{
string arg = args[i];
if (arg[0] == '-')
{
if (!argKeyPropertyMap.TryGetValue(arg, out property))
{
Console.Error.WriteLine($"Invalid argument: {arg}, no such argument key exists");
return false;
}
// Boolean arguments require no value, set to true immidiately.
if (property.PropertyType == typeof(bool))
{
property.SetValue(Arguments, true);
lastArgType = ArgType.Value;
}
else
{
lastArgType = ArgType.Key;
}
}
else
{
if (lastArgType == ArgType.None)
{
Console.Error.WriteLine($"Invalid argument: {arg}, no argument key was provided");
return false;
}
Type propertyType = property.PropertyType;
if (propertyType.IsArray)
{
throw new InvalidOperationException("Arrays are not supported, use List<T> instead");
}
bool propertyTypeIsList = propertyType.IsGenericType && propertyType.GetGenericTypeDefinition() == typeof(List<>);
if (propertyTypeIsList)
{
propertyType = propertyType.GenericTypeArguments[0];
}
TypeConverter typeConverter = TypeDescriptor.GetConverter(propertyType);
object value = typeConverter.ConvertFromString(arg);
if (value is string stringValue)
{
if (!string.IsNullOrEmpty(stringValue))
{
if (stringValue[0] == '"')
{
stringValue = stringValue.Substring(1, stringValue.Length - 1);
}
if (stringValue[^1] == '"')
{
stringValue = stringValue.Substring(0, stringValue.Length - 1);
}
value = stringValue;
}
}
if (propertyTypeIsList)
{
IList list = (IList)property.GetValue(Arguments);
if (list == null)
{
list = (IList)Activator.CreateInstance(property.PropertyType);
property.SetValue(Arguments, list);
}
list.Add(value);
}
else
{
property.SetValue(Arguments, value);
}
lastArgType = ArgType.Value;
}
}
return true;
}
}

View File

@ -0,0 +1,11 @@
namespace Nerfed.Builder;
public class ArgumentAttribute : Attribute
{
public string ArgKey { get; }
public ArgumentAttribute(string argKey)
{
ArgKey = argKey;
}
}

View File

@ -0,0 +1,19 @@
namespace Nerfed.Builder;
public class BuildArgs
{
[Argument("-build")]
public bool Build { get; set; }
[Argument("-resourcePath")]
public string ResourcePath { get; set; }
[Argument("-resourceOutPath")]
public string ResourceOutPath { get; set; }
[Argument("-platform")]
public string Platform { get; set; }
[Argument("-resourceFiles")]
public List<string> ResourceFiles { get; set; }
}

View File

@ -0,0 +1,144 @@
using System.Diagnostics;
namespace Nerfed.Builder;
public class Builder : IDisposable
{
private readonly Dictionary<string, IImporter> importers = new Dictionary<string, IImporter>();
private readonly RawFileImporter rawFileImporter;
public Builder()
{
rawFileImporter = new RawFileImporter();
importers.Add(".vert", new ShaderImporter(ShaderStage.Vertex)); // Vertex shader
importers.Add(".frag", new ShaderImporter(ShaderStage.Fragment)); // Fragment shader
//importers.Add(".tesc", shaderImporter); // Tessellation control shader
//importers.Add(".tese", shaderImporter); // Tessellation evaluation shader
//importers.Add(".geom", shaderImporter); // Geometry shader
//importers.Add(".comp", shaderImporter); // Compute shader
}
public void Run(BuildArgs args)
{
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
//CopyLibs(args.ResourcePath);
List<string> contentFiles = args.ResourceFiles;
// If no files are provided, build all content.
if (args.ResourceFiles == null)
{
contentFiles = [];
CollectAssetFiles(args.ResourcePath, args.ResourcePath, ref contentFiles);
}
if (contentFiles.Count > 0)
{
ParallelOptions parallelOptions = new ParallelOptions
{
MaxDegreeOfParallelism = contentFiles.Count
};
Parallel.ForEach(contentFiles, parallelOptions, relativeFile =>
{
try
{
string inFile = $"{args.ResourcePath}/{relativeFile}";
if (!File.Exists(inFile))
{
Console.Error.WriteLine($"Asset file '{relativeFile}' not found");
return;
}
string outFile = $"{args.ResourceOutPath}/{relativeFile}{PathUtil.ImportedFileExtension}";
FileInfo inFileInfo = new FileInfo(inFile);
FileInfo outFileInfo = new FileInfo(outFile);
if (!FileUtil.IsNewer(inFileInfo, outFileInfo))
{
// File has not changed since last build, no need to build this one.
return;
}
string outDir = Path.GetDirectoryName(outFile);
if (!Directory.Exists(outDir))
{
Directory.CreateDirectory(outDir);
}
string ext = Path.GetExtension(inFile).ToLower();
if (importers.TryGetValue(ext, out IImporter importer))
{
importer.Import(inFile, outFile);
}
else
{
rawFileImporter.Import(inFile, outFile);
}
Console.WriteLine(relativeFile);
}
catch (Exception e)
{
Console.Error.WriteLine($"Import error on asset '{relativeFile}': {e.Message}");
}
});
}
Console.WriteLine($"Build content completed in {stopwatch.Elapsed.TotalSeconds:F2} seconds");
}
/*private void CopyLibs(string projectPath)
{
string libDir = $"{AppDomain.CurrentDomain.BaseDirectory}/../../Native/";
if (OperatingSystem.IsWindows())
{
libDir += "x64";
}
else if (OperatingSystem.IsLinux())
{
libDir += "lib64";
}
else if (OperatingSystem.IsMacOS())
{
libDir += "osx";
}
libDir = Path.GetFullPath(libDir);
foreach (string libFile in Directory.EnumerateFiles(libDir))
{
FileInfo srcFileInfo = new FileInfo(libFile);
FileInfo dstFileInfo = new FileInfo($"{projectPath}/{PathUtil.BuildFolderName}/{Path.GetFileName(libFile)}");
if (FileUtil.IsNewer(srcFileInfo, dstFileInfo))
{
FileUtil.Copy(srcFileInfo, dstFileInfo);
}
}
}*/
private void CollectAssetFiles(string assetDir, string dir, ref List<string> files)
{
foreach (string file in Directory.EnumerateFiles(dir))
{
string relativeFile = file.Substring(assetDir.Length, file.Length - assetDir.Length);
if (relativeFile[0] == Path.DirectorySeparatorChar || relativeFile[0] == Path.AltDirectorySeparatorChar)
{
relativeFile = relativeFile.Substring(1, relativeFile.Length - 1);
}
files.Add(relativeFile);
}
foreach (string subDir in Directory.EnumerateDirectories(dir))
{
CollectAssetFiles(assetDir, subDir, ref files);
}
}
public void Dispose() { }
}

View File

@ -0,0 +1,49 @@
namespace Nerfed.Builder;
public static class FileUtil
{
public static void Copy(FileInfo srcFile, FileInfo dstFile)
{
Copy(srcFile.FullName, dstFile.FullName);
}
public static void Copy(string srcFile, string dstFile)
{
string dstDir = Path.GetDirectoryName(dstFile);
if (!Directory.Exists(dstDir))
{
Directory.CreateDirectory(dstDir);
}
File.Copy(srcFile, dstFile, true);
UpdateFileTimeAttributes(dstFile);
}
public static void WriteBytes(string dstFile, byte[] bytes)
{
File.WriteAllBytes(dstFile, bytes);
UpdateFileTimeAttributes(dstFile);
}
public static void UpdateFileTimeAttributes(string file)
{
// Copy over date time attributes so we can check if the file changed.
FileInfo dstFileInfo = new FileInfo(file);
DateTime now = DateTime.Now;
DateTime utcNow = DateTime.UtcNow;
dstFileInfo.CreationTime = now;
dstFileInfo.CreationTimeUtc = utcNow;
dstFileInfo.LastWriteTime = now;
dstFileInfo.LastWriteTimeUtc = utcNow;
dstFileInfo.LastAccessTime = now;
dstFileInfo.LastAccessTimeUtc = utcNow;
}
/// <summary>
/// True if the inFileInfo is newer than the outFileInfo.
/// </summary>
public static bool IsNewer(FileInfo inFileInfo, FileInfo outFileInfo)
{
return !outFileInfo.Exists || outFileInfo.LastWriteTime <= inFileInfo.LastWriteTime;
}
}

View File

@ -0,0 +1,6 @@
namespace Nerfed.Builder;
public interface IImporter
{
void Import(string inFile, string outFile);
}

View File

@ -0,0 +1,9 @@
namespace Nerfed.Builder;
public class RawFileImporter : IImporter
{
public void Import(string inFile, string outFile)
{
FileUtil.Copy(inFile, outFile);
}
}

View File

@ -0,0 +1,157 @@
using Vortice.ShaderCompiler;
using Vortice.SPIRV.Reflect;
namespace Nerfed.Builder;
// Values should match the ShaderStage enum in the runtime.
public enum ShaderStage
{
Vertex,
Fragment
}
// Values should match the ShaderFormat enum in the runtime.
public enum ShaderFormat
{
Invalid,
SPIRV,
HLSL,
DXBC,
DXIL,
MSL,
METALLIB,
SECRET
}
public class ShaderImporter : IImporter
{
private readonly ShaderStage shaderStage;
public ShaderImporter(ShaderStage shaderStage)
{
this.shaderStage = shaderStage;
}
public unsafe void Import(string inFile, string outFile)
{
string name = Path.GetFileNameWithoutExtension(inFile);
string nameWithExt = Path.GetFileName(inFile);
// Compile the shader.
Result compileResult;
using (Compiler compiler = new Compiler())
{
string shaderSource = File.ReadAllText(inFile);
compileResult = compiler.Compile(shaderSource, nameWithExt, ToShaderKind(shaderStage));
}
if (compileResult.Status != CompilationStatus.Success)
{
Console.Error.WriteLine($"Failed to compile {nameWithExt}\n{compileResult.ErrorMessage}");
return;
}
if (compileResult.ErrorsCount > 0 || compileResult.WarningsCount > 0)
{
Console.Error.WriteLine(compileResult.ErrorMessage);
}
Span<byte> byteCode = compileResult.GetBytecode();
// Inspect SPIR-V bytecode for information which the runtime requires to create a shader resource.
SpvReflectShaderModule module = new SpvReflectShaderModule();
if (!CheckReflectResult(SPIRVReflectApi.spvReflectCreateShaderModule(byteCode, &module), name))
{
return;
}
uint descriptorSetCount = 0;
if (!CheckReflectResult(SPIRVReflectApi.spvReflectEnumerateDescriptorSets(&module, &descriptorSetCount, null), name))
{
return;
}
int uniformBufferCount = 0;
int storageBufferCount = 0;
int storageTextureCount = 0;
int samplerCount = 0;
if (descriptorSetCount > 0)
{
SpvReflectDescriptorSet* descriptorSets = stackalloc SpvReflectDescriptorSet[(int)descriptorSetCount];
if (!CheckReflectResult(
SPIRVReflectApi.spvReflectEnumerateDescriptorSets(&module, &descriptorSetCount, &descriptorSets),
name
))
{
return;
}
for (int i = 0; i < descriptorSetCount; i++)
{
SpvReflectDescriptorSet set = descriptorSets[i];
for (int j = 0; j < set.binding_count; j++)
{
SpvReflectDescriptorBinding binding = *set.bindings[j];
if (binding.descriptor_type == SpvReflectDescriptorType.UniformBuffer)
{
uniformBufferCount++;
}
else if (binding.descriptor_type == SpvReflectDescriptorType.StorageBuffer)
{
storageBufferCount++;
}
else if (binding.descriptor_type == SpvReflectDescriptorType.StorageTexelBuffer)
{
storageTextureCount++;
}
else if (binding.descriptor_type == SpvReflectDescriptorType.Sampler ||
binding.descriptor_type == SpvReflectDescriptorType.CombinedImageSampler)
{
samplerCount++;
}
}
}
}
//TODO: Convert SPIR-V to other bytecode formats here (DX/Consoles).
ShaderFormat format = ShaderFormat.SPIRV;
// Write shader meta-data and bytecode to the output file.
using (FileStream stream = new FileStream(outFile, FileMode.Create, FileAccess.Write))
{
using (BinaryWriter writer = new BinaryWriter(stream))
{
writer.Write((int)format);
writer.Write((int)shaderStage);
writer.Write(uniformBufferCount);
writer.Write(storageBufferCount);
writer.Write(storageTextureCount);
writer.Write(samplerCount);
writer.Write(byteCode.Length);
writer.Write(byteCode);
}
}
}
private bool CheckReflectResult(SpvReflectResult result, string name)
{
if (result != SpvReflectResult.Success)
{
Console.Error.WriteLine($"SpirV-Reflect failure for '{name}': {result}");
return false;
}
return true;
}
private ShaderKind ToShaderKind(ShaderStage shaderStage)
{
switch (shaderStage)
{
case ShaderStage.Vertex: return ShaderKind.VertexShader;
case ShaderStage.Fragment: return ShaderKind.FragmentShader;
default: throw new ArgumentOutOfRangeException(nameof(shaderStage));
}
}
}

View File

@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<IsPackable>false</IsPackable>
<Configurations>Debug;Test;Release</Configurations>
<Platforms>x64</Platforms>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Test|x64' ">
<Optimize>true</Optimize>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<Optimize>true</Optimize>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Vortice.ShaderCompiler" Version="1.7.3" />
<PackageReference Include="Vortice.SPIRV.Reflect" Version="1.0.3" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=builder/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=builder_005Cimporters/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=packager/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -0,0 +1,6 @@
namespace Nerfed.Builder;
public class PackageArgs
{
}

View File

@ -0,0 +1,12 @@
namespace Nerfed.Builder;
public class Packager : IDisposable
{
public void Run(PackageArgs args)
{
}
public void Dispose()
{
}
}

View File

@ -0,0 +1,6 @@
namespace Nerfed.Builder;
public static class PathUtil
{
public const string ImportedFileExtension = ".bin";
}

70
Nerfed.Builder/Program.cs Normal file
View File

@ -0,0 +1,70 @@
using System.Diagnostics;
namespace Nerfed.Builder;
internal class Program
{
private static int Main(string[] args)
{
if (Debugger.IsAttached)
{
return Run(args);
}
else
{
try
{
return Run(args);
}
catch (Exception e)
{
Console.Error.WriteLine(e.Message);
return -1;
}
}
}
private static int Run(string[] rawArgs)
{
if (rawArgs.Length == 0)
{
Console.Error.WriteLine($"Invalid build type '{rawArgs[0]}' expected '-build' or '-package'");
return -1;
}
string buildType = rawArgs[0].ToLower();
if (buildType == "-build")
{
ArgsParser<BuildArgs> parser = new ArgsParser<BuildArgs>(rawArgs);
if (!parser.Parse())
{
Console.Error.Write("Failed to parse build arguments");
return -1;
}
using (Builder builder = new Builder())
{
builder.Run(parser.Arguments);
}
}
else if (buildType == "-package")
{
ArgsParser<PackageArgs> parser = new ArgsParser<PackageArgs>(rawArgs);
if (!parser.Parse())
{
Console.Error.Write("Failed to parse package arguments");
return -1;
}
using (Packager packager = new Packager())
{
packager.Run(parser.Arguments);
}
Console.Error.WriteLine("Packaging not yet implemented");
return -1;
}
return 0;
}
}

View File

@ -0,0 +1,64 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Nerfed.Compiler;
public class AssemblyDefinition
{
public string Name { get; set; }
public string Guid { get; set; }
//public bool IsEditor { get; set; }
// Add platform stuff here..?
// Add dll's here..?
// Add dependencies here..?
public static bool Create(string assemblyDefinitionFilePath, string name, out AssemblyDefinition assemblyDefinition)
{
assemblyDefinition = null;
if (File.Exists(assemblyDefinitionFilePath))
{
Console.WriteLine($"ERROR: File already exists!");
return false;
}
// Create project file.
assemblyDefinition = new AssemblyDefinition
{
Name = name,
Guid = System.Guid.NewGuid().ToString("B").ToUpper(),
};
Save(assemblyDefinition, assemblyDefinitionFilePath);
return true;
}
public static bool Save(AssemblyDefinition assemblyDefinition, string assemblyDefinitionFilePath)
{
string jsonString = JsonSerializer.Serialize(assemblyDefinition, AssemblyDefinitionContext.Default.AssemblyDefinition);
File.WriteAllText(assemblyDefinitionFilePath, jsonString);
return true;
}
public static bool Open(string assemblyDefinitionFilePath, out AssemblyDefinition assemblyDefinition)
{
string jsonString = File.ReadAllText(assemblyDefinitionFilePath);
assemblyDefinition = JsonSerializer.Deserialize(jsonString, AssemblyDefinitionContext.Default.AssemblyDefinition);
if (assemblyDefinition == null)
{
Console.WriteLine($"ERROR: Could not open {typeof(AssemblyDefinition)}.");
return false;
}
return true;
}
}
[JsonSerializable(typeof(AssemblyDefinition))]
public partial class AssemblyDefinitionContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,82 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Nerfed.Compiler;
public static class Compiler
{
public static bool Compile(string projectFilePath, string configuration = "Debug")
{
string projectDirectory = Path.GetDirectoryName(projectFilePath);
if (!File.Exists(projectFilePath))
{
Console.WriteLine($"ERROR: Project file not found at {projectDirectory}.");
return false;
}
if (!Project.Open(projectFilePath, out Project project))
{
return false;
}
// TODO: Check project version, to make sure we can compile it or something...
// Generate solution.
Generator.GenerateSolution(projectDirectory, project, out string solutionFilePath);
// Compile solution.
ProcessStartInfo processInfo = new()
{
WorkingDirectory = Path.GetDirectoryName(solutionFilePath),
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
};
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
processInfo.FileName = "/bin/bash";
processInfo.Arguments = $"-c \"dotnet build '{Path.GetFileName(solutionFilePath)}'\"" + (string.IsNullOrWhiteSpace(configuration) ? $" --configuration {configuration}" : "");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
processInfo.FileName = "cmd.exe";
processInfo.Arguments = $"/c dotnet build \"{Path.GetFileName(solutionFilePath)}\"" + (string.IsNullOrWhiteSpace(configuration) ? $" --configuration {configuration}" : "");
}
else
{
Console.WriteLine($"ERROR: Platform not supported!");
return false;
}
Process process = Process.Start(processInfo) ?? throw new Exception();
process.OutputDataReceived += (sender, dataArgs) => {
string data = dataArgs.Data;
if (data is null)
{
return;
}
Console.WriteLine(data);
};
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.ErrorDataReceived += (sender, dataArgs) => {
if (dataArgs.Data is not null)
{
Console.WriteLine(dataArgs.Data);
}
};
process.WaitForExit();
int exitCode = process.ExitCode;
process.Close();
return true;
}
}

View File

@ -0,0 +1,161 @@
using System.Reflection;
using System.Text;
using System.Text.Json;
namespace Nerfed.Compiler;
public static class Generator
{
public const string AssemblyDefinitionExtensionName = ".asmdef";
public const string CSProjectExtensionName = ".csproj";
public const string SolutionExtensionName = ".sln";
public static void GenerateSolution(string projectDirectory, Project project, out string solutionFilePath)
{
// Clear files.
ClearCSProjectFiles(projectDirectory);
// Generate projects.
string[] assemblyDefinitionFilePaths = Directory.GetFiles(projectDirectory, AssemblyDefinitionExtensionName, SearchOption.AllDirectories);
foreach (string assemblyDefinitionFilePath in assemblyDefinitionFilePaths)
{
GenerateCSProject(assemblyDefinitionFilePath, projectDirectory, out string csProjectFilePath);
}
// Generate solution.
string[] csProjectPaths = Directory.GetFiles(projectDirectory, $"*{CSProjectExtensionName}", SearchOption.TopDirectoryOnly);
string[] csProjectGuids = new string[csProjectPaths.Length];
for (int i = 0; i < csProjectPaths.Length; i++)
{
csProjectGuids[i] = Guid.NewGuid().ToString("B").ToUpper();
}
StringBuilder content = new StringBuilder();
// Write the solution file header
content.AppendLine("Microsoft Visual Studio Solution File, Format Version 12.00");
content.AppendLine("# Visual Studio Version 17");
content.AppendLine("VisualStudioVersion = 17.10.35013.160");
content.AppendLine("MinimumVisualStudioVersion = 10.0.40219.1");
// Add each project to the solution file
for (int i = 0; i < csProjectPaths.Length; i++)
{
string csProjectPath = csProjectPaths[i];
string csProjectGuid = csProjectGuids[i];
string csProjectName = Path.GetFileNameWithoutExtension(csProjectPath);
string csProjectRelativePath = Path.GetRelativePath(projectDirectory, csProjectPath);
// FAE04EC0-301F-11D3-BF4B-00C04F79EFBC for C# projects.
content.AppendLine($"Project(\"{{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}}\") = \"{csProjectName}\", \"{csProjectRelativePath}\", \"{csProjectGuid}\"");
content.AppendLine("EndProject");
}
// Add global sections (these can be extended as needed)
content.AppendLine("Global");
content.AppendLine(" GlobalSection(SolutionConfigurationPlatforms) = preSolution");
content.AppendLine(" Test|x64 = Test|x64");
content.AppendLine(" Release|x64 = Release|x64");
content.AppendLine(" Debug|x64 = Debug|x64");
content.AppendLine(" EndGlobalSection");
content.AppendLine(" GlobalSection(ProjectConfigurationPlatforms) = postSolution");
for (int i = 0; i < csProjectPaths.Length; i++)
{
string projectGuid = csProjectGuids[i];
content.AppendLine($" {projectGuid}.Test|x64.ActiveCfg = Test|x64");
content.AppendLine($" {projectGuid}.Test|x64.Build.0 = Test|x64");
content.AppendLine($" {projectGuid}.Release|x64.ActiveCfg = Release|x64");
content.AppendLine($" {projectGuid}.Release|x64.Build.0 = Release|x64");
content.AppendLine($" {projectGuid}.Debug|x64.ActiveCfg = Debug|x64");
content.AppendLine($" {projectGuid}.Debug|x64.Build.0 = Debug|x64");
}
content.AppendLine(" EndGlobalSection");
content.AppendLine(" GlobalSection(SolutionProperties) = preSolution");
content.AppendLine(" HideSolutionNode = FALSE");
content.AppendLine(" EndGlobalSection");
content.AppendLine("EndGlobal");
// Write the solution file content to disk
string solutionName = project.Name + SolutionExtensionName;
solutionFilePath = Path.Combine(projectDirectory, solutionName);
File.WriteAllText(solutionFilePath, content.ToString());
}
private static bool GenerateCSProject(string assemblyDefinitionFilePath, string projectPath, out string csProjectFilePath)
{
if (!File.Exists(assemblyDefinitionFilePath))
{
csProjectFilePath = string.Empty;
return false;
}
string jsonString = File.ReadAllText(assemblyDefinitionFilePath);
AssemblyDefinition assemblyDefinition = JsonSerializer.Deserialize(jsonString, AssemblyDefinitionContext.Default.AssemblyDefinition);
Assembly[] loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies();
Assembly runtimeAssembly = loadedAssemblies.FirstOrDefault(assembly => assembly.GetName().Name == "Nerfed.Runtime") ?? throw new Exception("Failed to find Runtime Assembly!");
// TODO: get all dependencies.
// TODO: properly get assemblies.
StringBuilder content = new StringBuilder();
content.AppendLine("<Project Sdk=\"Microsoft.NET.Sdk\">");
content.AppendLine(" <PropertyGroup>");
content.AppendLine(" <TargetFramework>net8.0</TargetFramework>");
content.AppendLine(" <ImplicitUsings>enable</ImplicitUsings>");
content.AppendLine(" <Nullable>disable</Nullable>");
content.AppendLine(" <PublishAot>true</PublishAot>");
content.AppendLine(" <InvariantGlobalization>true</InvariantGlobalization>");
content.AppendLine(" <AllowUnsafeBlocks>true</AllowUnsafeBlocks>");
content.AppendLine(" <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>");
content.AppendLine(" <IsPackable>false</IsPackable>");
content.AppendLine(" <Configurations>Debug;Test;Release</Configurations>");
content.AppendLine(" <Platforms>x64</Platforms>");
content.AppendLine(" </PropertyGroup>");
content.AppendLine(" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x64' \">");
content.AppendLine(" <DefineConstants>TRACE;LOG_INFO;PROFILING</DefineConstants>");
content.AppendLine(" </PropertyGroup>");
content.AppendLine(" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Test|x64' \">");
content.AppendLine(" <DefineConstants>TRACE;LOG_ERROR;PROFILING</DefineConstants>");
content.AppendLine(" <Optimize>true</Optimize>");
content.AppendLine(" </PropertyGroup>");
content.AppendLine(" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x64' \">");
content.AppendLine(" <DefineConstants>TRACE;LOG_ERROR</DefineConstants>");
content.AppendLine(" <Optimize>true</Optimize>");
content.AppendLine(" </PropertyGroup>");
content.AppendLine(" <ItemGroup>");
content.AppendLine($" <Compile Include=\"{assemblyDefinitionFilePath}/**/*.cs\"/>");
content.AppendLine(" </ItemGroup>");
content.AppendLine(" <ItemGroup>");
content.AppendLine(" <Reference Include=\"Nerfed.Runtime\">");
content.AppendLine($" <HintPath>{runtimeAssembly.Location}</HintPath>");
content.AppendLine(" <Private>false</Private>");
content.AppendLine(" </Reference>");
content.AppendLine(" </ItemGroup>");
content.AppendLine("</Project>");
string csProjectName = assemblyDefinition.Name + CSProjectExtensionName;
csProjectFilePath = Path.Combine(projectPath, csProjectName);
File.WriteAllText(csProjectFilePath, content.ToString());
return true;
}
private static void ClearCSProjectFiles(string projectPath)
{
string[] csProjectFiles = Directory.GetFiles(projectPath, $"*{CSProjectExtensionName}", SearchOption.TopDirectoryOnly);
foreach (string csProjectFile in csProjectFiles)
{
File.Delete(csProjectFile);
}
}
}

View File

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<IsPackable>false</IsPackable>
<Configurations>Debug;Test;Release</Configurations>
<Platforms>x64</Platforms>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Test|x64' ">
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<Optimize>true</Optimize>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,15 @@
namespace Nerfed.Compiler;
public class Program
{
internal static void Main(string[] args)
{
if (args.Length != 2)
{
Console.WriteLine("projectFilePath, configuration (Debug, Test, Release)");
return;
}
Compiler.Compile(args[0], args[1]);
}
}

View File

@ -0,0 +1,50 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Nerfed.Compiler;
public class Project
{
public string Name { get; set; }
public static bool Create(string path, string name, out Project project)
{
// Create project file.
project = new Project
{
Name = name,
};
Save(project, path);
return true;
}
public static bool Save(Project project, string projectFilePath)
{
string jsonString = JsonSerializer.Serialize(project, ProjectContext.Default.Project);
File.WriteAllText(projectFilePath, jsonString);
return true;
}
public static bool Open(string path, out Project project)
{
string jsonString = File.ReadAllText(path);
project = JsonSerializer.Deserialize(jsonString, ProjectContext.Default.Project);
if (project == null)
{
Console.WriteLine($"ERROR: Could not open {typeof(Project)}.");
return false;
}
return true;
}
}
[JsonSerializable(typeof(Project))]
public partial class ProjectContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Runtime ID" AfterTargets="Build">
<Message Text="Runtime ID: $(RuntimeIdentifier)" Importance="high"/>
</Target>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))">
<Libs Include="..\Native\x64\**\*.*"/>
</ItemGroup>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))">
<Libs Include="..\Native\lib64\**\*.*"/>
</ItemGroup>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))">
<Libs Include="..\Native\osx\**\*.*"/>
</ItemGroup>
<Target Name="CopyLibs" AfterTargets="Build">
<Copy SourceFiles="@(Libs)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" OverwriteReadOnlyFiles="true"/>
</Target>
</Project>

View File

@ -0,0 +1,75 @@
using ImGuiNET;
using Nerfed.Editor.Project;
using Nerfed.Runtime;
using Nerfed.Runtime.Graphics;
using Nerfed.Runtime.Gui;
namespace Nerfed.Editor
{
internal static class EditorGui
{
private static GuiController guiController;
internal static void Initialize()
{
// Create GuiController.
guiController = new GuiController(Engine.GraphicsDevice, Engine.MainWindow, Color.DimGray);
// Subscribe to GUI update.
// GuiController.OnGui call => UpdateDock;
// GuiController.OnGui call => UpdateEditorWindows;
// GuiController.OnGui call => ...;
guiController.OnGui += HandleOnGui;
}
internal static void Update()
{
// Update GuiController.
guiController.Update(Engine.Timestep.TotalSeconds);
}
internal static void Render()
{
// Reneder GuiController.
guiController.Render();
}
internal static void Quit()
{
guiController.Dispose();
}
private static void UpdateDock()
{
// Setup default dockspace for the main window.
uint id = ImGui.GetID("MainDockSpace");
ImGui.DockSpaceOverViewport(id, ImGui.GetMainViewport(), ImGuiDockNodeFlags.None);
}
private static void UpdateMainMenu()
{
if (ImGui.BeginMainMenuBar())
{
if (ImGui.BeginMenu("File"))
{
if (ImGui.MenuItem("Exit"))
{
Engine.Quit();
}
ImGui.EndMenu();
}
ImGui.EndMainMenuBar();
}
}
private static void HandleOnGui()
{
UpdateMainMenu();
UpdateDock();
ImGui.ShowDemoWindow();
EditorProjectGui.OnGui();
}
}
}

View File

@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<IsPackable>false</IsPackable>
<Configurations>Debug;Test;Release</Configurations>
<Platforms>x64</Platforms>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Test|x64' ">
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Nerfed.Compiler\Nerfed.Compiler.csproj" />
<ProjectReference Include="..\Nerfed.Runtime\Nerfed.Runtime.csproj" />
</ItemGroup>
<Import Project=".\CopyLibs.targets" />
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="&quot;$(ProjectDir)../Bin/Nerfed.Builder/Nerfed.Builder&quot; -build -resourcePath &quot;$(ProjectDir)Resources&quot; -resourceOutPath &quot;$(TargetDir)Resources&quot; " />
</Target>
</Project>

42
Nerfed.Editor/Program.cs Normal file
View File

@ -0,0 +1,42 @@
using Nerfed.Runtime;
namespace Nerfed.Editor;
internal class Program
{
private static void Main(string[] args)
{
Engine.OnInitialize += HandleOnInitialize;
Engine.OnUpdate += HandleOnUpdate;
Engine.OnRender += HandleOnRender;
Engine.OnQuit += HandleOnQuit;
Engine.Run(args);
}
private static void HandleOnInitialize()
{
// Open project.
// Setip EditorGui.
EditorGui.Initialize();
}
private static void HandleOnUpdate()
{
// Editor Update.
EditorGui.Update();
// Try Catch UserCode Update.
}
private static void HandleOnRender()
{
EditorGui.Render();
}
private static void HandleOnQuit()
{
EditorGui.Quit();
}
}

View File

@ -0,0 +1,8 @@
using System.Runtime.Loader;
namespace Nerfed.Editor.Project;
internal class EditorAssemblyLoadContext : AssemblyLoadContext
{
public EditorAssemblyLoadContext() : base(isCollectible: true) { }
}

View File

@ -0,0 +1,124 @@
using Nerfed.Runtime;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace Nerfed.Editor.Project;
// https://github.com/godotengine/godot/blob/master/modules/mono/glue/GodotSharp/GodotPlugins/Main.c
// https://gitlab.com/robertk92/assemblyreloadtest/-/blob/main/AppContextTest/Program.cs
internal static class EditorAssemblyLoader
{
internal sealed class EditorAssemblyLoadContextWrapper
{
private EditorAssemblyLoadContext assemblyLoadContext;
private readonly WeakReference weakReference;
private EditorAssemblyLoadContextWrapper(EditorAssemblyLoadContext assemblyLoadContext, WeakReference weakReference)
{
this.assemblyLoadContext = assemblyLoadContext;
this.weakReference = weakReference;
}
public bool IsCollectible
{
[MethodImpl(MethodImplOptions.NoInlining)]
// If assemblyLoadContext is null we already started unloading, so it was collectible.
get => assemblyLoadContext?.IsCollectible ?? true;
}
public bool IsAlive
{
[MethodImpl(MethodImplOptions.NoInlining)]
get => weakReference.IsAlive;
}
[MethodImpl(MethodImplOptions.NoInlining)]
public static (Assembly, EditorAssemblyLoadContextWrapper) CreateAndLoad(AssemblyName assemblyName)
{
EditorAssemblyLoadContext context = new EditorAssemblyLoadContext();
WeakReference reference = new WeakReference(context, trackResurrection: true);
EditorAssemblyLoadContextWrapper wrapper = new EditorAssemblyLoadContextWrapper(context, reference);
Assembly assembly = context.LoadFromAssemblyName(assemblyName);
return (assembly, wrapper);
}
[MethodImpl(MethodImplOptions.NoInlining)]
public static (Assembly, EditorAssemblyLoadContextWrapper) CreateAndLoad(string assemblyPath)
{
EditorAssemblyLoadContext context = new EditorAssemblyLoadContext();
WeakReference reference = new WeakReference(context, trackResurrection: true);
EditorAssemblyLoadContextWrapper wrapper = new EditorAssemblyLoadContextWrapper(context, reference);
Assembly assembly = context.LoadFromAssemblyPath(assemblyPath);
return (assembly, wrapper);
}
[MethodImpl(MethodImplOptions.NoInlining)]
internal void Unload()
{
assemblyLoadContext?.Unload();
assemblyLoadContext = null;
}
}
internal static (Assembly, EditorAssemblyLoadContextWrapper) Load(string assemblyFilePath)
{
string assemblyFileName = Path.GetFileNameWithoutExtension(assemblyFilePath);
AssemblyName assemblyName = new AssemblyName(assemblyFileName);
return EditorAssemblyLoadContextWrapper.CreateAndLoad(assemblyName);
}
internal static (Assembly, EditorAssemblyLoadContextWrapper) LoadFromPath(string assemblyFilePath)
{
return EditorAssemblyLoadContextWrapper.CreateAndLoad(assemblyFilePath);
}
internal static bool Unload(EditorAssemblyLoadContextWrapper assemblyLoadContextWrapper)
{
if (assemblyLoadContextWrapper == null)
{
return true;
}
if (!assemblyLoadContextWrapper.IsCollectible)
{
Log.Error($"{assemblyLoadContextWrapper} is not collectable!");
return false;
}
assemblyLoadContextWrapper.Unload();
GC.Collect();
GC.WaitForPendingFinalizers();
TimeSpan timeout = TimeSpan.FromSeconds(30);
Stopwatch stopwatch = Stopwatch.StartNew();
while (assemblyLoadContextWrapper.IsAlive)
{
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
GC.WaitForPendingFinalizers();
if (!assemblyLoadContextWrapper.IsAlive)
{
break;
}
if (stopwatch.Elapsed.TotalSeconds % 10 == 0)
{
Log.Info("Tring to unload assembly...");
}
if (stopwatch.Elapsed >= timeout)
{
Log.Error("Failed to unload assembly!");
return false;
}
}
return true;
}
}

View File

@ -0,0 +1,173 @@
using Nerfed.Runtime;
namespace Nerfed.Editor.Project;
internal static class EditorProject
{
internal static Compiler.Project Project { get; private set; } = null;
internal static string ProjectFilePath { get; private set; } = string.Empty;
internal static string ProjectSolutionFilePath { get; private set; } = string.Empty;
internal static string ProjectDirectory { get; private set; } = string.Empty;
internal static string ProjectContentDirectory { get; private set; } = string.Empty;
internal static string ProjectTempDirectory { get; private set; } = string.Empty;
private static readonly List<(string, EditorAssemblyLoader.EditorAssemblyLoadContextWrapper)> editorAssemblyLoadContextWrappers = [];
internal static bool Create(string projectFilePath, string projectName)
{
Close();
if (!Compiler.Project.Create(projectFilePath, projectName, out Compiler.Project project))
{
return false;
}
Open(projectFilePath);
Log.Info($"Succesfully created project.");
return true;
}
internal static bool Open(string projectFilePath)
{
Close();
if(!Compiler.Project.Open(projectFilePath, out Compiler.Project project))
{
return false;
}
Project = project;
ProjectFilePath = projectFilePath;
ProjectDirectory = Path.GetDirectoryName(projectFilePath);
string projectSolutionFilePath = Path.Combine(ProjectDirectory, Project.Name + Compiler.Generator.SolutionExtensionName);
if (File.Exists(projectSolutionFilePath))
{
ProjectSolutionFilePath = projectSolutionFilePath;
}
SetupDefaultFolders();
Compile();
Log.Info($"Opened project: {project.Name}");
return true;
}
internal static void Close()
{
Project = null;
ProjectFilePath = string.Empty;
ProjectSolutionFilePath = string.Empty;
ProjectDirectory = string.Empty;
ProjectContentDirectory = string.Empty;
ProjectTempDirectory = string.Empty;
}
internal static bool Save()
{
if(Project == null)
{
return false;
}
return Compiler.Project.Save(Project, ProjectFilePath);
}
internal static void Compile()
{
if(Project == null)
{
return;
}
UnloadAssemblies();
Compiler.Compiler.Compile(ProjectFilePath, "Debug");
LoadAssemblies();
}
internal static void GenerateSolution()
{
if(Project == null)
{
return;
}
Compiler.Generator.GenerateSolution(ProjectDirectory, Project, out string solutionFilePath);
ProjectSolutionFilePath = solutionFilePath;
}
private static void SetupDefaultFolders()
{
if (Project == null || ProjectDirectory == null)
{
return;
}
string contentDirectory = Path.Combine(ProjectDirectory, "Content");
if (!Directory.Exists(contentDirectory))
{
Directory.CreateDirectory(contentDirectory);
}
ProjectContentDirectory = contentDirectory;
string scriptsDirectory = Path.Combine(ProjectContentDirectory, "Scripts");
if (!Directory.Exists(scriptsDirectory))
{
Directory.CreateDirectory(scriptsDirectory);
}
string scriptsRuntimePath = Path.Combine(scriptsDirectory, "Runtime");
if (!Directory.Exists(scriptsRuntimePath))
{
Directory.CreateDirectory(scriptsRuntimePath);
}
// Test create csproject.
string gameplayRuntimeFilePath = Path.Combine(scriptsRuntimePath, Compiler.Generator.AssemblyDefinitionExtensionName);
if (!File.Exists(gameplayRuntimeFilePath))
{
Compiler.AssemblyDefinition.Create(gameplayRuntimeFilePath, "Gameplay", out Compiler.AssemblyDefinition project);
}
string tempDirectory = Path.Combine(ProjectDirectory, "Temp");
if (!Directory.Exists(tempDirectory))
{
Directory.CreateDirectory(tempDirectory);
}
ProjectTempDirectory = tempDirectory;
}
private static void LoadAssemblies()
{
string[] assemblies = Directory.GetFiles(Path.Combine(ProjectDirectory, "bin"), "*.dll", SearchOption.AllDirectories);
foreach (string assembly in assemblies)
{
(System.Reflection.Assembly, EditorAssemblyLoader.EditorAssemblyLoadContextWrapper) a = EditorAssemblyLoader.LoadFromPath(assembly);
string name = a.Item1.GetName().Name;
editorAssemblyLoadContextWrappers.Add((name, a.Item2));
Log.Info($"loaded {name}");
}
Nerfed.Runtime.Generator.Hook.InvokeHooks();
}
private static void UnloadAssemblies()
{
for (int i = editorAssemblyLoadContextWrappers.Count - 1; i >= 0; i--)
{
(string, EditorAssemblyLoader.EditorAssemblyLoadContextWrapper) a = editorAssemblyLoadContextWrappers[i];
if (EditorAssemblyLoader.Unload(a.Item2))
{
Log.Info($"Unloaded {a.Item1}");
editorAssemblyLoadContextWrappers.RemoveAt(i);
}
else
{
Log.Error($"Could not unload {a.Item1}");
}
}
}
}

View File

@ -0,0 +1,67 @@
using ImGuiNET;
namespace Nerfed.Editor.Project;
internal static class EditorProjectGui
{
private static string projectDirectory = string.Empty;
private static string projectName = string.Empty;
private static string projectFilePath = string.Empty;
internal static void OnGui()
{
ImGui.Begin("Project");
ImGui.BeginGroup();
ImGui.InputText("Project Directory", ref projectDirectory, 512);
ImGui.InputText("Project Name", ref projectName, 512);
string newProjectFilePath = Path.Combine(projectDirectory, ".project");
ImGui.Text(newProjectFilePath);
if (ImGui.Button("Create Project"))
{
EditorProject.Create(newProjectFilePath, projectName);
}
ImGui.EndGroup();
ImGui.BeginGroup();
ImGui.InputText("Project File Path", ref projectFilePath, 512);
if (ImGui.Button("Open Project"))
{
EditorProject.Open(projectFilePath);
}
ImGui.Text("Loaded project: ");
if(EditorProject.Project != null)
{
ImGui.Text(EditorProject.Project.Name);
ImGui.Text(EditorProject.ProjectFilePath);
ImGui.Text(EditorProject.ProjectSolutionFilePath);
ImGui.Text(EditorProject.ProjectDirectory);
ImGui.Text(EditorProject.ProjectContentDirectory);
ImGui.Text(EditorProject.ProjectTempDirectory);
}
else
{
ImGui.Text("None");
}
ImGui.EndGroup();
ImGui.BeginGroup();
if (ImGui.Button("Generate Solution"))
{
EditorProject.GenerateSolution();
}
if (ImGui.Button("Compile"))
{
EditorProject.Compile();
}
ImGui.EndGroup();
ImGui.End();
}
}

View File

@ -0,0 +1,9 @@
#version 450
layout(location = 0) out vec2 outTexCoord;
void main()
{
outTexCoord = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
gl_Position = vec4(outTexCoord * vec2(2.0, -2.0) + vec2(-1.0, 1.0), 0.0, 1.0);
}

View File

@ -0,0 +1,34 @@
#version 450
layout(location = 0) in vec2 inTexCoord;
layout(location = 1) in vec4 inColor;
layout(location = 0) out vec4 outColor;
layout(set = 2, binding = 0) uniform sampler2D msdf;
layout(set = 3, binding = 0) uniform UBO
{
float pxRange;
} ubo;
float median(float r, float g, float b)
{
return max(min(r, g), min(max(r, g), b));
}
float screenPxRange()
{
vec2 unitRange = vec2(ubo.pxRange)/vec2(textureSize(msdf, 0));
vec2 screenTexSize = vec2(1.0)/fwidth(inTexCoord);
return max(0.5*dot(unitRange, screenTexSize), 1.0);
}
void main()
{
vec3 msd = texture(msdf, inTexCoord).rgb;
float sd = median(msd.r, msd.g, msd.b);
float screenPxDistance = screenPxRange() * (sd - 0.5);
float opacity = clamp(screenPxDistance + 0.5, 0.0, 1.0);
outColor = mix(vec4(0.0, 0.0, 0.0, 0.0), inColor, opacity);
}

View File

@ -0,0 +1,20 @@
#version 450
layout(location = 0) in vec3 inPos;
layout(location = 1) in vec2 inTexCoord;
layout(location = 2) in vec4 inColor;
layout(location = 0) out vec2 outTexCoord;
layout(location = 1) out vec4 outColor;
layout(set = 1, binding = 0) uniform UBO
{
mat4 ViewProjection;
} ubo;
void main()
{
gl_Position = ubo.ViewProjection * vec4(inPos, 1.0);
outTexCoord = inTexCoord;
outColor = inColor;
}

View File

@ -0,0 +1,38 @@
/*
* This effect is based on the YUV-to-RGBA GLSL shader found in SDL.
* Thus, it also released under the zlib license:
* http://libsdl.org/license.php
*/
#version 450
layout(location = 0) in vec2 TexCoord;
layout(location = 0) out vec4 FragColor;
layout(set = 2, binding = 0) uniform sampler2D YSampler;
layout(set = 2, binding = 1) uniform sampler2D USampler;
layout(set = 2, binding = 2) uniform sampler2D VSampler;
/* More info about colorspace conversion:
* http://www.equasys.de/colorconversion.html
* http://www.equasys.de/colorformat.html
*/
const vec3 offset = vec3(-0.0625, -0.5, -0.5);
const vec3 Rcoeff = vec3(1.164, 0.000, 1.793);
const vec3 Gcoeff = vec3(1.164, -0.213, -0.533);
const vec3 Bcoeff = vec3(1.164, 2.112, 0.000);
void main()
{
vec3 yuv;
yuv.x = texture(YSampler, TexCoord).r;
yuv.y = texture(USampler, TexCoord).r;
yuv.z = texture(VSampler, TexCoord).r;
yuv += offset;
FragColor.r = dot(yuv, Rcoeff);
FragColor.g = dot(yuv, Gcoeff);
FragColor.b = dot(yuv, Bcoeff);
FragColor.a = 1.0;
}

View File

@ -0,0 +1,91 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Nerfed.Runtime.Generator
{
[Generator]
public class HookSourceGenerator : ISourceGenerator
{
public void Execute(GeneratorExecutionContext context)
{
// Ensure the syntax receiver is not null and is of the expected type
if (context.SyntaxReceiver is not HookSyntaxReceiver syntaxReceiver)
return;
// Check if we have collected any hook methods
List<MethodDeclarationSyntax> hookMethods = syntaxReceiver.HookMethods;
if (hookMethods == null || !hookMethods.Any())
return;
StringBuilder codeBuilder = new StringBuilder();
codeBuilder.AppendLine("using System;");
codeBuilder.AppendLine("");
codeBuilder.AppendLine("namespace Nerfed.Runtime.Generator;");
codeBuilder.AppendLine("");
codeBuilder.AppendLine($"// Generated by {typeof(HookSourceGenerator)}");
codeBuilder.AppendLine("public static class Hook");
codeBuilder.AppendLine("{");
codeBuilder.AppendLine(" public static void InvokeHooks()");
codeBuilder.AppendLine(" {");
foreach (MethodDeclarationSyntax method in hookMethods)
{
SemanticModel model = context.Compilation.GetSemanticModel(method.SyntaxTree);
if (model.GetDeclaredSymbol(method) is not IMethodSymbol methodSymbol)
{
continue;
}
if (methodSymbol.DeclaredAccessibility != Accessibility.Public || !methodSymbol.IsStatic)
{
continue;
}
codeBuilder.AppendLine($" {methodSymbol.ContainingType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}.{methodSymbol.Name}();");
}
codeBuilder.AppendLine(" }");
codeBuilder.AppendLine("}");
// Add the generated code to the compilation
context.AddSource("Hook.g.cs", codeBuilder.ToString());
}
public void Initialize(GeneratorInitializationContext context)
{
context.RegisterForSyntaxNotifications(() => new HookSyntaxReceiver());
}
public class HookSyntaxReceiver : ISyntaxReceiver
{
public List<MethodDeclarationSyntax> HookMethods { get; } = new List<MethodDeclarationSyntax>();
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
{
// Check if the node is a method declaration
if (syntaxNode is MethodDeclarationSyntax methodDeclaration)
{
// Ensure the method declaration has attribute lists
if (methodDeclaration.AttributeLists.Count == 0)
return;
// Check if the method has the Hook attribute
bool hasHookAttribute = methodDeclaration.AttributeLists
.SelectMany(attrList => attrList.Attributes)
.Any(attr => attr.Name.ToString() == "Hook");
if (hasHookAttribute)
{
HookMethods.Add(methodDeclaration);
}
}
}
}
}
}

View File

@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<Configurations>Debug;Test;Release</Configurations>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0"/>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>TRACE;LOG_INFO;PROFILING</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Test|x64' ">
<DefineConstants>TRACE;LOG_ERROR;PROFILING</DefineConstants>
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DefineConstants>TRACE;LOG_ERROR</DefineConstants>
<Optimize>true</Optimize>
</PropertyGroup>
</Project>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Runtime ID" AfterTargets="Build">
<Message Text="Runtime ID: $(RuntimeIdentifier)" Importance="high"/>
</Target>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))">
<Content Include="..\libs\x64\**\*.*" >
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))">
<Content Include="..\libs\lib64\**\*.*" >
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))">
<Content Include="..\libs\osx\**\*.*" >
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

View File

@ -7,6 +7,11 @@ namespace Nerfed.Runtime;
public static class Engine
{
public static event Action OnInitialize;
public static event Action OnUpdate;
public static event Action OnRender;
public static event Action OnQuit;
public static TimeSpan MaxDeltaTime { get; set; } = TimeSpan.FromMilliseconds(100);
public static bool VSync { get; set; }
@ -19,6 +24,7 @@ public static class Engine
private static Stopwatch gameTimer;
private static long previousTicks = 0;
private static TimeSpan accumulatedUpdateTime = TimeSpan.Zero;
private static TimeSpan accumulatedDrawTime = TimeSpan.Zero;
// must be a power of 2 so we can do a bitmask optimization when checking worst case
@ -38,9 +44,7 @@ public static class Engine
private const string WindowTitle = "Nerfed";
//..
private static Gui.GuiController Controller;
internal static void Run(string[] args)
public static void Run(string[] args)
{
Timestep = TimeSpan.FromTicks(TimeSpan.TicksPerSecond / TargetTimestep);
gameTimer = Stopwatch.StartNew();
@ -55,8 +59,9 @@ public static class Engine
{
throw new Exception("Failed to init SDL");
}
GraphicsDevice = new GraphicsDevice(BackendFlags.All);
GraphicsDevice.LoadDefaultPipelines();
MainWindow = new Window(GraphicsDevice, new WindowCreateInfo(WindowTitle, WindowWidth, WindowHeight, ScreenMode.Windowed));
if (!GraphicsDevice.ClaimWindow(MainWindow, SwapchainComposition.SDR, VSync ? PresentMode.VSync : PresentMode.Mailbox))
@ -64,23 +69,18 @@ public static class Engine
throw new Exception("Failed to claim window");
}
MainWindow.OnCloseEvent += (w) => {
Quit();
};
AudioDevice = new AudioDevice();
Controller = new Gui.GuiController(GraphicsDevice, MainWindow, Color.DarkOliveGreen);
Controller.OnGui += () => {
ImGuiNET.ImGui.ShowDemoWindow();
};
OnInitialize?.Invoke();
Nerfed.Runtime.Generator.Hook.InvokeHooks();
while (!quit)
{
Tick();
}
Controller.Dispose();
OnQuit?.Invoke();
GraphicsDevice.UnclaimWindow(MainWindow);
MainWindow.Dispose();
GraphicsDevice.Dispose();
@ -157,7 +157,7 @@ public static class Engine
ProcessSDLEvents();
// Tick game here...
Controller.Update((float)Timestep.TotalSeconds);
OnUpdate?.Invoke();
AudioDevice.WakeThread();
accumulatedUpdateTime -= Timestep;
@ -166,7 +166,7 @@ public static class Engine
double alpha = accumulatedUpdateTime / Timestep;
// Render here..
Controller.Render();
OnRender?.Invoke();
accumulatedDrawTime -= framerateCapTimeSpan;
}

View File

@ -1,716 +0,0 @@
namespace Nerfed.Runtime.Graphics;
internal class EmbeddedShadersSpirV : IEmbeddedShaders
{
public ShaderFormat ShaderFormat => ShaderFormat.SPIRV;
public byte[] FullscreenVert { get; } =
[
0x3, 0x2, 0x23, 0x7, 0x0, 0x0, 0x1, 0x0, 0xB, 0x0,
0x8, 0x0, 0x2E, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x11, 0x0, 0x2, 0x0, 0x1, 0x0, 0x0, 0x0, 0xB, 0x0,
0x6, 0x0, 0x1, 0x0, 0x0, 0x0, 0x47, 0x4C, 0x53, 0x4C,
0x2E, 0x73, 0x74, 0x64, 0x2E, 0x34, 0x35, 0x30, 0x0, 0x0,
0x0, 0x0, 0xE, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0,
0x1, 0x0, 0x0, 0x0, 0xF, 0x0, 0x8, 0x0, 0x0, 0x0,
0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x6D, 0x61, 0x69, 0x6E,
0x0, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0xC, 0x0,
0x0, 0x0, 0x1D, 0x0, 0x0, 0x0, 0x3, 0x0, 0x3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time.InteropServices;
namespace Nerfed.Runtime.Graphics;
@ -13,12 +13,16 @@ public class GraphicsDevice : IDisposable
public BackendFlags Backend { get; }
public bool DebugMode { get; }
// Built-in shaders
public Shader FullscreenVertexShader { get; private set; }
public Shader VideoFragmentShader { get; private set; }
public Shader TextVertexShader { get; private set; }
public Shader TextFragmentShader { get; private set; }
// Built-in video pipeline
internal GraphicsPipeline VideoPipeline { get; }
internal GraphicsPipeline VideoPipeline { get; private set; }
// Built-in text shader info
public Shader TextVertexShader;
public Shader TextFragmentShader;
public VertexInputState TextVertexInputState { get; }
// Built-in samplers
@ -53,85 +57,21 @@ public class GraphicsDevice : IDisposable
Backend = (BackendFlags)Refresh.Refresh_GetBackend(Handle);
IEmbeddedShaders embeddedShaders;
switch (Backend)
{
case BackendFlags.Vulkan:
embeddedShaders = new EmbeddedShadersSpirV();
break;
case BackendFlags.D3D11:
throw new NotImplementedException("D3D11 embedded shaders");
break;
case BackendFlags.Metal:
throw new NotImplementedException("Metal embedded shaders");
break;
default: throw new ArgumentOutOfRangeException();
}
TextVertexInputState = VertexInputState.CreateSingleBinding<FontVertex>();
Shader fullscreenVertShader;
Shader textVertShader;
Shader textFragShader;
Shader videoFragShader;
PointSampler = new Sampler(this, SamplerCreateInfo.PointClamp);
LinearSampler = new Sampler(this, SamplerCreateInfo.LinearClamp);
using (MemoryStream fullscreenVertStream = new MemoryStream(embeddedShaders.FullscreenVert))
{
fullscreenVertShader = new Shader(
this,
fullscreenVertStream,
"main",
new ShaderCreateInfo
{
ShaderStage = ShaderStage.Vertex,
ShaderFormat = embeddedShaders.ShaderFormat
}
);
}
fencePool = new FencePool(this);
commandBufferPool = new CommandBufferPool(this);
}
using (MemoryStream videoYuv2RgbaFragStream = new MemoryStream(embeddedShaders.VideoYuv2RgbaFrag))
{
videoFragShader = new Shader(
this,
videoYuv2RgbaFragStream,
"main",
new ShaderCreateInfo
{
ShaderStage = ShaderStage.Fragment,
ShaderFormat = embeddedShaders.ShaderFormat,
SamplerCount = 3
}
);
}
using (MemoryStream textTransformVertStream = new MemoryStream(embeddedShaders.TextTransformVert))
{
textVertShader = new Shader(
this,
textTransformVertStream,
"main",
new ShaderCreateInfo
{
ShaderStage = ShaderStage.Vertex,
ShaderFormat = embeddedShaders.ShaderFormat,
UniformBufferCount = 1
}
);
}
using (MemoryStream textMsdfFragStream = new MemoryStream(embeddedShaders.TextMsdfFrag))
{
textFragShader = new Shader(
this,
textMsdfFragStream,
"main",
new ShaderCreateInfo
{
ShaderStage = ShaderStage.Fragment,
ShaderFormat = embeddedShaders.ShaderFormat,
SamplerCount = 1,
UniformBufferCount = 1
}
);
}
internal void LoadDefaultPipelines()
{
FullscreenVertexShader = ResourceManager.Load<Shader>("Shaders/Fullscreen.vert");
VideoFragmentShader = ResourceManager.Load<Shader>("Shaders/Video.frag");
TextVertexShader = ResourceManager.Load<Shader>("Shaders/Text.vert");
TextFragmentShader = ResourceManager.Load<Shader>("Shaders/Text.frag");
VideoPipeline = new GraphicsPipeline(
this,
@ -144,25 +84,14 @@ public class GraphicsDevice : IDisposable
)
),
DepthStencilState = DepthStencilState.Disable,
VertexShader = fullscreenVertShader,
FragmentShader = videoFragShader,
VertexShader = FullscreenVertexShader,
FragmentShader = VideoFragmentShader,
VertexInputState = VertexInputState.Empty,
RasterizerState = RasterizerState.CCW_CullNone,
PrimitiveType = PrimitiveType.TriangleList,
MultisampleState = MultisampleState.None
}
);
TextVertexShader = textVertShader;
TextFragmentShader = textFragShader;
TextVertexInputState = VertexInputState.CreateSingleBinding<FontVertex>();
PointSampler = new Sampler(this, SamplerCreateInfo.PointClamp);
LinearSampler = new Sampler(this, SamplerCreateInfo.LinearClamp);
fencePool = new FencePool(this);
commandBufferPool = new CommandBufferPool(this);
}
/// <summary>
@ -443,6 +372,11 @@ public class GraphicsDevice : IDisposable
resources.Clear();
}
ResourceManager.Unload(FullscreenVertexShader);
ResourceManager.Unload(TextFragmentShader);
ResourceManager.Unload(TextVertexShader);
ResourceManager.Unload(VideoFragmentShader);
}
Refresh.Refresh_DestroyDevice(Handle);

View File

@ -1,10 +0,0 @@
namespace Nerfed.Runtime.Graphics;
internal interface IEmbeddedShaders
{
ShaderFormat ShaderFormat { get; }
byte[] FullscreenVert { get; }
byte[] TextMsdfFrag { get; }
byte[] TextTransformVert { get; }
byte[] VideoYuv2RgbaFrag { get; }
}

View File

@ -1,91 +0,0 @@
using RefreshCS;
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Nerfed.Runtime.Graphics;
/// <summary>
/// Shaders are used to create graphics pipelines.
/// Graphics pipelines take a vertex shader and a fragment shader.
/// </summary>
public class Shader : RefreshResource
{
protected override Action<IntPtr, IntPtr> ReleaseFunction => Refresh.Refresh_ReleaseShader;
public uint SamplerCount { get; }
public uint StorageTextureCount { get; }
public uint StorageBufferCount { get; }
public uint UniformBufferCount { get; }
public unsafe Shader(
GraphicsDevice device,
string filePath,
string entryPointName,
in ShaderCreateInfo shaderCreateInfo
) : base(device)
{
using FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
Handle = CreateFromStream(
device,
stream,
entryPointName,
shaderCreateInfo
);
SamplerCount = shaderCreateInfo.SamplerCount;
StorageTextureCount = shaderCreateInfo.StorageTextureCount;
StorageBufferCount = shaderCreateInfo.StorageBufferCount;
UniformBufferCount = shaderCreateInfo.UniformBufferCount;
}
public unsafe Shader(
GraphicsDevice device,
Stream stream,
string entryPointName,
in ShaderCreateInfo shaderCreateInfo
) : base(device)
{
Handle = CreateFromStream(
device,
stream,
entryPointName,
shaderCreateInfo
);
SamplerCount = shaderCreateInfo.SamplerCount;
StorageTextureCount = shaderCreateInfo.StorageTextureCount;
StorageBufferCount = shaderCreateInfo.StorageBufferCount;
UniformBufferCount = shaderCreateInfo.UniformBufferCount;
}
private static unsafe IntPtr CreateFromStream(
GraphicsDevice device,
Stream stream,
string entryPointName,
in ShaderCreateInfo shaderCreateInfo
) {
void* bytecodeBuffer = NativeMemory.Alloc((nuint) stream.Length);
Span<byte> bytecodeSpan = new Span<byte>(bytecodeBuffer, (int) stream.Length);
stream.ReadExactly(bytecodeSpan);
Refresh.ShaderCreateInfo refreshShaderCreateInfo;
refreshShaderCreateInfo.CodeSize = (nuint) stream.Length;
refreshShaderCreateInfo.Code = (byte*) bytecodeBuffer;
refreshShaderCreateInfo.EntryPointName = entryPointName;
refreshShaderCreateInfo.Stage = (Refresh.ShaderStage) shaderCreateInfo.ShaderStage;
refreshShaderCreateInfo.Format = (Refresh.ShaderFormat) shaderCreateInfo.ShaderFormat;
refreshShaderCreateInfo.SamplerCount = shaderCreateInfo.SamplerCount;
refreshShaderCreateInfo.StorageTextureCount = shaderCreateInfo.StorageTextureCount;
refreshShaderCreateInfo.StorageBufferCount = shaderCreateInfo.StorageBufferCount;
refreshShaderCreateInfo.UniformBufferCount = shaderCreateInfo.UniformBufferCount;
IntPtr shaderModule = Refresh.Refresh_CreateShader(
device.Handle,
refreshShaderCreateInfo
);
NativeMemory.Free(bytecodeBuffer);
return shaderModule;
}
}

View File

@ -9,11 +9,11 @@ using System.Runtime.InteropServices;
namespace Nerfed.Runtime.Gui;
internal class GuiController : IDisposable
public class GuiController : IDisposable
{
public event Action OnGui;
private readonly string shaderContentPath = Path.Combine(System.AppContext.BaseDirectory, "Assets", "Shaders");
private readonly string shaderContentPath = Path.Combine(System.AppContext.BaseDirectory, "Content", "Shaders");
private readonly GraphicsDevice graphicsDevice;
private readonly Window mainWindow;
@ -60,20 +60,8 @@ internal class GuiController : IDisposable
io.DisplaySize = new Vector2(mainWindow.Width, mainWindow.Height);
io.DisplayFramebufferScale = Vector2.One;
ShaderCreateInfo vertexCreateInfo = new ShaderCreateInfo {
ShaderStage = ShaderStage.Vertex,
ShaderFormat = ShaderFormat.SPIRV,
UniformBufferCount = 1,
};
imGuiVertexShader = new Shader(graphicsDevice, Path.Combine(shaderContentPath, "imgui-vertex.spv"), "main", in vertexCreateInfo);
ShaderCreateInfo fragCreateInfo = new ShaderCreateInfo {
ShaderStage = ShaderStage.Fragment,
ShaderFormat = ShaderFormat.SPIRV,
SamplerCount = 1,
};
imGuiFragmentShader = new Shader(graphicsDevice, Path.Combine(shaderContentPath, "imgui-frag.spv"), "main", in fragCreateInfo);
imGuiVertexShader = ResourceManager.Load<Shader>("Shaders/ImGui.vert");
imGuiFragmentShader = ResourceManager.Load<Shader>("Shaders/ImGui.frag");
imGuiSampler = new Sampler(graphicsDevice, SamplerCreateInfo.LinearClamp);
@ -144,9 +132,13 @@ internal class GuiController : IDisposable
io.BackendFlags |= ImGuiBackendFlags.HasSetMousePos;
io.BackendFlags |= ImGuiBackendFlags.PlatformHasViewports;
io.BackendFlags |= ImGuiBackendFlags.RendererHasViewports;
UpdatePerFrameImGuiData(1.0 / 60.0);
ImGui.NewFrame();
frameBegun = true;
}
public void Update(float deltaTime)
public void Update(double deltaTime)
{
if (frameBegun)
{
@ -167,15 +159,15 @@ internal class GuiController : IDisposable
ImGui.EndFrame();
}
private void UpdatePerFrameImGuiData(float deltaSeconds)
private void UpdatePerFrameImGuiData(double deltaSeconds)
{
ImGuiIOPtr io = ImGui.GetIO();
io.DisplaySize = new Vector2(mainWindow.Width, mainWindow.Height);
io.DisplayFramebufferScale = new Vector2(1, 1);
io.DeltaTime = deltaSeconds; // DeltaTime is in seconds.
io.DeltaTime = (float)deltaSeconds; // DeltaTime is in seconds.
}
private static void UpdateInput()
private void UpdateInput()
{
ImGuiIOPtr io = ImGui.GetIO();
@ -240,7 +232,7 @@ internal class GuiController : IDisposable
}
}
private static void UpdateCursor()
private void UpdateCursor()
{
ImGuiIOPtr io = ImGui.GetIO();
@ -500,6 +492,7 @@ internal class GuiController : IDisposable
commandBuffer.EndRenderPass(renderPass);
}
#region Resources
private unsafe void BuildFontAtlas()
{
ResourceUploader resourceUploader = new ResourceUploader(graphicsDevice);
@ -528,6 +521,7 @@ internal class GuiController : IDisposable
textureStorage.Add(fontTexture); // <-- The fontTexture seems to get lost after some time (CG?).
this.fontTexture = fontTexture; // <-- So we also keep a reference to make sure it doesn't happen.
}
#endregion
#region Window
private void CreateWindow(ImGuiViewportPtr vp)
@ -636,8 +630,8 @@ internal class GuiController : IDisposable
fontTexture?.Dispose();
imGuiVertexBuffer?.Dispose();
imGuiIndexBuffer?.Dispose();
imGuiFragmentShader?.Dispose();
imGuiVertexShader?.Dispose();
ResourceManager.Unload(imGuiVertexShader);
ResourceManager.Unload(imGuiFragmentShader);
imGuiPipeline?.Dispose();
imGuiSampler?.Dispose();
resourceUploader?.Dispose();

View File

@ -1,2 +0,0 @@
glslangvalidator -V imgui-vertex.glsl -o imgui-vertex.spv -S vert
glslangvalidator -V imgui-frag.glsl -o imgui-frag.spv -S frag

View File

@ -0,0 +1,7 @@
namespace Nerfed.Runtime.Hook
{
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public class HookAttribute : Attribute
{
}
}

View File

@ -0,0 +1,11 @@
namespace Nerfed.Runtime.Hook
{
public static class HookTest
{
[Hook]
public static void Test()
{
Log.Info("Hook!");
}
}
}

View File

@ -1,36 +1,50 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes);Libraries\**\*</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
<Compile Include="Libraries\SDL2CS\src\SDL2.cs" />
<Compile Include="Libraries\RefreshCS\RefreshCS.cs" />
<Compile Include="Libraries\FAudio\csharp\FAudio.cs" />
<Compile Include="Libraries\WellspringCS\WellspringCS.cs" />
<Compile Include="Libraries\dav1dfile\csharp\dav1dfile.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="Libraries\ImGui.NET\src\ImGui.NET\ImGui.NET.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\**\*.*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<PublishAot>true</PublishAot>
<InvariantGlobalization>true</InvariantGlobalization>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<IsPackable>false</IsPackable>
<Configurations>Debug;Test;Release</Configurations>
<Platforms>x64</Platforms>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>
<Import Project=".\CopyLibs.targets" />
<PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes);Libraries\**\*</DefaultItemExcludes>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>TRACE;LOG_INFO;PROFILING</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Test|x64' ">
<DefineConstants>TRACE;LOG_ERROR;PROFILING</DefineConstants>
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DefineConstants>TRACE;LOG_ERROR</DefineConstants>
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="Libraries\SDL2CS\src\SDL2.cs" />
<Compile Include="Libraries\RefreshCS\RefreshCS.cs" />
<Compile Include="Libraries\FAudio\csharp\FAudio.cs" />
<Compile Include="Libraries\WellspringCS\WellspringCS.cs" />
<Compile Include="Libraries\dav1dfile\csharp\dav1dfile.cs" />
<Compile Include="Libraries\ImGui.NET\src\ImGui.NET\**\*.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Nerfed.Runtime.Generator\Nerfed.Runtime.Generator.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=resource/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -17,12 +17,12 @@ public struct ProfilerScope : IDisposable
public static class Profiler
{
[Conditional("PROFILER")]
[Conditional("PROFILING")]
public static void BeginSample(string label) {
}
[Conditional("PROFILER")]
[Conditional("PROFILING")]
public static void EndSample() {
}

View File

@ -1,9 +0,0 @@
namespace Nerfed.Runtime;
internal class Program
{
private static void Main(string[] args)
{
Engine.Run(args);
}
}

View File

@ -0,0 +1,9 @@
namespace Nerfed.Runtime;
public abstract class Resource
{
public string Path { get; internal set; }
internal abstract void Load(Stream stream);
internal abstract void Unload();
}

View File

@ -0,0 +1,43 @@
namespace Nerfed.Runtime;
public static class ResourceManager
{
private const string rootName = "Resources";
private static readonly Dictionary<string, Resource> loadedResources = new Dictionary<string, Resource>();
public static T Load<T>(string resourcePath) where T : Resource
{
if (loadedResources.TryGetValue(resourcePath, out Resource resource))
{
return (T)resource;
}
if (typeof(T) == typeof(Shader))
{
resource = new Shader();
}
else
{
throw new Exception("Failed to create resource");
}
Assert.Always(resource != null);
resource.Path = resourcePath;
resource.Load(StorageContainer.OpenStream(Path.Combine(AppContext.BaseDirectory, rootName, resourcePath) + ".bin"));
loadedResources.Add(resourcePath, resource);
return (T)resource;
}
public static void Unload(Resource resource)
{
if (!loadedResources.ContainsKey(resource.Path))
{
return;
}
resource.Unload();
resource.Path = string.Empty;
loadedResources.Remove(resource.Path);
}
}

View File

@ -0,0 +1,58 @@
using System.Runtime.InteropServices;
using RefreshCS;
namespace Nerfed.Runtime;
public class Shader : Resource
{
public IntPtr Handle { get; private set; }
public uint SamplerCount { get; private set; }
public uint StorageTextureCount { get; private set; }
public uint StorageBufferCount { get; private set; }
public uint UniformBufferCount { get; private set; }
internal Shader() { }
internal override unsafe void Load(Stream stream)
{
using (BinaryReader reader = new BinaryReader(stream))
{
Refresh.ShaderCreateInfo createInfo;
createInfo.Format = (Refresh.ShaderFormat)reader.ReadInt32();
createInfo.Stage = (Refresh.ShaderStage)reader.ReadInt32();
createInfo.UniformBufferCount = (uint)reader.ReadInt32();
createInfo.StorageBufferCount = (uint)reader.ReadInt32();
createInfo.StorageTextureCount = (uint)reader.ReadInt32();
createInfo.SamplerCount = (uint)reader.ReadInt32();
int byteCodeSize = reader.ReadInt32();
void* byteCodeBuffer = NativeMemory.Alloc((nuint)byteCodeSize);
Span<byte> byteCodeSpan = new Span<byte>(byteCodeBuffer, byteCodeSize);
int bytesRead = 0;
while (bytesRead < byteCodeSize)
{
bytesRead += reader.Read(byteCodeSpan.Slice(bytesRead));
}
createInfo.CodeSize = (nuint)byteCodeSize;
createInfo.Code = (byte*)byteCodeBuffer;
createInfo.EntryPointName = "main";
Handle = Refresh.Refresh_CreateShader(Engine.GraphicsDevice.Handle, createInfo);
NativeMemory.Free(byteCodeBuffer);
SamplerCount = createInfo.SamplerCount;
StorageTextureCount = createInfo.StorageTextureCount;
StorageBufferCount = createInfo.StorageBufferCount;
UniformBufferCount = createInfo.UniformBufferCount;
}
}
internal override void Unload()
{
Refresh.Refresh_ReleaseShader(Engine.GraphicsDevice.Handle, Handle);
Handle = IntPtr.Zero;
}
}

View File

@ -5,22 +5,54 @@ VisualStudioVersion = 17.10.35013.160
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nerfed.Runtime", "Nerfed.Runtime\Nerfed.Runtime.csproj", "{98E09BAF-587F-4238-89BD-7693C036C233}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImGui.NET", "Nerfed.Runtime\Libraries\ImGui.NET\src\ImGui.NET\ImGui.NET.csproj", "{4EC3C399-4E09-4A36-B11E-391F0792C1C8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nerfed.Builder", "Nerfed.Builder\Nerfed.Builder.csproj", "{1B88DE56-2AD8-441E-9B10-073AA43840BF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nerfed.Editor", "Nerfed.Editor\Nerfed.Editor.csproj", "{FF7D032D-7F0B-4700-A818-0606D66AECF8}"
ProjectSection(ProjectDependencies) = postProject
{1B88DE56-2AD8-441E-9B10-073AA43840BF} = {1B88DE56-2AD8-441E-9B10-073AA43840BF}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nerfed.Compiler", "Nerfed.Compiler\Nerfed.Compiler.csproj", "{3DFEB8A4-5354-41EA-A249-27ADC7F666CF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nerfed.Runtime.Generator", "Nerfed.Runtime.Generator\Nerfed.Runtime.Generator.csproj", "{8743FDEF-4FF6-48F9-9F64-7BDEC543C105}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
Release|x64 = Release|x64
Test|x64 = Test|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{98E09BAF-587F-4238-89BD-7693C036C233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98E09BAF-587F-4238-89BD-7693C036C233}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98E09BAF-587F-4238-89BD-7693C036C233}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98E09BAF-587F-4238-89BD-7693C036C233}.Release|Any CPU.Build.0 = Release|Any CPU
{4EC3C399-4E09-4A36-B11E-391F0792C1C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EC3C399-4E09-4A36-B11E-391F0792C1C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EC3C399-4E09-4A36-B11E-391F0792C1C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EC3C399-4E09-4A36-B11E-391F0792C1C8}.Release|Any CPU.Build.0 = Release|Any CPU
{98E09BAF-587F-4238-89BD-7693C036C233}.Debug|x64.ActiveCfg = Debug|x64
{98E09BAF-587F-4238-89BD-7693C036C233}.Debug|x64.Build.0 = Debug|x64
{98E09BAF-587F-4238-89BD-7693C036C233}.Release|x64.ActiveCfg = Release|x64
{98E09BAF-587F-4238-89BD-7693C036C233}.Release|x64.Build.0 = Release|x64
{98E09BAF-587F-4238-89BD-7693C036C233}.Test|x64.ActiveCfg = Test|x64
{98E09BAF-587F-4238-89BD-7693C036C233}.Test|x64.Build.0 = Test|x64
{1B88DE56-2AD8-441E-9B10-073AA43840BF}.Debug|x64.ActiveCfg = Debug|x64
{1B88DE56-2AD8-441E-9B10-073AA43840BF}.Debug|x64.Build.0 = Debug|x64
{1B88DE56-2AD8-441E-9B10-073AA43840BF}.Release|x64.ActiveCfg = Release|x64
{1B88DE56-2AD8-441E-9B10-073AA43840BF}.Release|x64.Build.0 = Release|x64
{1B88DE56-2AD8-441E-9B10-073AA43840BF}.Test|x64.ActiveCfg = Test|x64
{1B88DE56-2AD8-441E-9B10-073AA43840BF}.Test|x64.Build.0 = Test|x64
{FF7D032D-7F0B-4700-A818-0606D66AECF8}.Debug|x64.ActiveCfg = Debug|x64
{FF7D032D-7F0B-4700-A818-0606D66AECF8}.Debug|x64.Build.0 = Debug|x64
{FF7D032D-7F0B-4700-A818-0606D66AECF8}.Release|x64.ActiveCfg = Release|x64
{FF7D032D-7F0B-4700-A818-0606D66AECF8}.Release|x64.Build.0 = Release|x64
{FF7D032D-7F0B-4700-A818-0606D66AECF8}.Test|x64.ActiveCfg = Test|x64
{FF7D032D-7F0B-4700-A818-0606D66AECF8}.Test|x64.Build.0 = Test|x64
{3DFEB8A4-5354-41EA-A249-27ADC7F666CF}.Debug|x64.ActiveCfg = Debug|x64
{3DFEB8A4-5354-41EA-A249-27ADC7F666CF}.Debug|x64.Build.0 = Debug|x64
{3DFEB8A4-5354-41EA-A249-27ADC7F666CF}.Release|x64.ActiveCfg = Release|x64
{3DFEB8A4-5354-41EA-A249-27ADC7F666CF}.Release|x64.Build.0 = Release|x64
{3DFEB8A4-5354-41EA-A249-27ADC7F666CF}.Test|x64.ActiveCfg = Test|x64
{3DFEB8A4-5354-41EA-A249-27ADC7F666CF}.Test|x64.Build.0 = Test|x64
{8743FDEF-4FF6-48F9-9F64-7BDEC543C105}.Debug|x64.ActiveCfg = Debug|x64
{8743FDEF-4FF6-48F9-9F64-7BDEC543C105}.Debug|x64.Build.0 = Debug|x64
{8743FDEF-4FF6-48F9-9F64-7BDEC543C105}.Release|x64.ActiveCfg = Release|x64
{8743FDEF-4FF6-48F9-9F64-7BDEC543C105}.Release|x64.Build.0 = Release|x64
{8743FDEF-4FF6-48F9-9F64-7BDEC543C105}.Test|x64.ActiveCfg = Test|x64
{8743FDEF-4FF6-48F9-9F64-7BDEC543C105}.Test|x64.Build.0 = Test|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Binary file not shown.

View File

@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"Nerfed.Builder/1.0.0": {
"runtime": {
"Nerfed.Builder.dll": {}
}
}
}
},
"libraries": {
"Nerfed.Builder/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

BIN
Tools/Nerfed.Builder/Nerfed.Builder.dll (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,13 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

BIN
Tools/glslc/Linux/glslc Executable file

Binary file not shown.

BIN
Tools/glslc/Win64/glslc.exe (Stored with Git LFS) Executable file

Binary file not shown.