daily update on 20240419 by nitload youmu, SSD merged into main stream
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp;
|
||||
using StgSharp.Data;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -56,13 +57,15 @@ namespace StgSharp.Graphics
|
||||
}
|
||||
}
|
||||
|
||||
public class Shader
|
||||
public class Shader : SSDSerializable
|
||||
{
|
||||
|
||||
private readonly IntPtr context;
|
||||
internal readonly glHandleSet handle;
|
||||
public readonly ShaderType type;
|
||||
|
||||
public override byte SSDTypeCode => SerializableTypeCode.Shader;
|
||||
|
||||
internal unsafe Shader(glHandleSet handle, ShaderType usage)
|
||||
{
|
||||
this.handle = handle;
|
||||
@@ -97,6 +100,21 @@ namespace StgSharp.Graphics
|
||||
return $"This is a {type} shader, its shader handles are {handle.ToString()}.";
|
||||
}
|
||||
|
||||
//TODO shader 的序列化究极麻烦,原因是shader的架构问题
|
||||
public override byte[] GetBytes()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override byte[] GetBytes(out int length)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
internal override void BuildFromByteStream(byte[] stream)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class ShaderProgram
|
||||
|
||||
Reference in New Issue
Block a user