MVVM frame work done, under unit test
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user