Updated structure and took first steps for a better architecture
Some checks failed
Gitea Actions Demo / Scan the project (push) Failing after 5s
Some checks failed
Gitea Actions Demo / Scan the project (push) Failing after 5s
This commit is contained in:
27
Nebulix/Rendering/Shaders/ShaderCompileException.cs
Normal file
27
Nebulix/Rendering/Shaders/ShaderCompileException.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Silk.NET.OpenGL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nebulix.Rendering;
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class ShaderCompileException : Exception
|
||||
{
|
||||
protected ShaderType _shaderType;
|
||||
|
||||
public ShaderCompileException(ShaderType shaderType) : base("Unable to compile shader.") { _shaderType = shaderType; }
|
||||
public ShaderCompileException(ShaderType shaderType, string message) : base(message) { _shaderType = shaderType; }
|
||||
public ShaderCompileException(ShaderType shaderType, string message, Exception inner) : base(message, inner) { _shaderType = shaderType; }
|
||||
protected ShaderCompileException(
|
||||
System.Runtime.Serialization.SerializationInfo info,
|
||||
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Type of Shader: '{_shaderType}'" + "\n" + Message;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user