Remove mono from Glue functions

This commit is contained in:
Simon Lübeß
2025-07-17 20:07:19 +02:00
parent f77b153512
commit 271286fb7e
19 changed files with 546 additions and 742 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
using System.Diagnostics.SymbolStore;
using System;
using System.Diagnostics.SymbolStore;
using GlitchyEngine.Core;
using GlitchyEngine.Math;
@@ -22,7 +23,7 @@ public class Material : Asset
{
unsafe
{
ScriptGlue.Material_SetVariable(_uuid, name, ShaderVariableType.Float, 1, 4, 1, &value, sizeof(float4));
ScriptGlue.Material_SetVariable(_uuid, name, ShaderVariableType.Float, 1, 4, 1, (IntPtr)(void*)&value, sizeof(float4));
}
}
+13 -3
View File
@@ -30,10 +30,20 @@ public class SpriteRenderer : Component
{
get
{
ScriptGlue.SpriteRenderer_GetUvTransform(_uuid, out UVTransform uvTransform);
return uvTransform;
unsafe
{
// TODO: Is this a type we want to have in the engine?
ScriptGlue.SpriteRenderer_GetUvTransform(_uuid, out float4 uvTransform);
return *(UVTransform*)&uvTransform;
}
}
set
{
unsafe
{
ScriptGlue.SpriteRenderer_SetUvTransform(_uuid, *(float4*)&value);
}
}
set => ScriptGlue.SpriteRenderer_SetUvTransform(_uuid, value);
}
/// <summary>