MVVM frame work done, under unit test

This commit is contained in:
Nitload
2024-07-25 04:41:24 +08:00
parent 924fe6eef7
commit da75200347
101 changed files with 8435 additions and 847 deletions
@@ -29,7 +29,7 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp.Graphics;
using StgSharp.Graphics.GL;
using StgSharp.Graphics.OpenGL;
using StgSharp.Math;
using System;
@@ -51,7 +51,7 @@ namespace StgSharp.Graphics.ShaderEdit
{
ShaderParameter p = new ShaderParameter(name,ShaderParameter.TypeMarshal<T>());
uniformDefine.Add(index,p);
//return new Uniform<T>();
//return new Uniform<TView>();
throw new NotImplementedException();
}
@@ -1,4 +1,4 @@
using StgSharp.Graphics.GL;
using StgSharp.Graphics.OpenGL;
using System;
using System.Collections.Generic;
@@ -16,11 +16,11 @@ namespace StgSharp.Graphics.ShaderEdit
public class ShaderStruct
{
internal Dictionary<glSHandle, ShaderStructMember> uniformPair;
internal Dictionary<GlHandle, ShaderStructMember> uniformPair;
public ShaderStruct(params (glSHandle, ShaderStructMember)[] uniformPairs)
public ShaderStruct(params (GlHandle, ShaderStructMember)[] uniformPairs)
{
uniformPair = new Dictionary<glSHandle, ShaderStructMember>();
uniformPair = new Dictionary<GlHandle, ShaderStructMember>();
if (uniformPairs.Length == 0)
{
return;
@@ -38,10 +38,10 @@ namespace StgSharp.Graphics.ShaderEdit
public unsafe void SetAllUniforms()
{
GLcontext* gl = (GLcontext*) glFunc.CurrentContextHandle;
GLcontext* gl = (GLcontext*)OpenGL.GlFunction.CurrentGL.ContextHandle;
foreach (var uniform in uniformPair)
{
int id = uniform.Key.Value;
int id = uniform.Key.SignedValue;
ShaderStructMember s = uniform.Value;
switch (s.type)
{