mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-09-09 03:01:41 -04:00
Update LoggingUtils and Material
This commit is contained in:
@@ -28,25 +28,25 @@ namespace Raylib_cs
|
|||||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||||
struct VaListLinuxX64
|
struct VaListLinuxX64
|
||||||
{
|
{
|
||||||
uint gp_offset;
|
uint gpOffset;
|
||||||
uint fp_offset;
|
uint fpOffset;
|
||||||
IntPtr overflow_arg_area;
|
IntPtr overflowArgArea;
|
||||||
IntPtr reg_save_area;
|
IntPtr regSaveArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logging workaround for formatting strings from native code
|
/// Logging workaround for formatting strings from native code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class LoggingUtils
|
public static class Logging
|
||||||
{
|
{
|
||||||
static LoggingUtils()
|
static Logging()
|
||||||
{
|
{
|
||||||
Raylib.SetTraceLogCallback(LogConsole);
|
Raylib.SetTraceLogCallback(LogConsole);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LogConsole(TraceLogLevel msgType, IntPtr text, IntPtr args)
|
public static void LogConsole(TraceLogLevel msgType, IntPtr text, IntPtr args)
|
||||||
{
|
{
|
||||||
var message = LoggingUtils.GetLogMessage(text, args);
|
var message = GetLogMessage(text, args);
|
||||||
Console.WriteLine(message);
|
Console.WriteLine(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,6 @@ namespace Raylib_cs
|
|||||||
byteLength = Native.vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, listPointer) + 1;
|
byteLength = Native.vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, listPointer) + 1;
|
||||||
|
|
||||||
// Allocate buffer for result
|
// Allocate buffer for result
|
||||||
// listPointer = Marshal.AllocHGlobal(Marshal.SizeOf(listStructure));
|
|
||||||
Marshal.StructureToPtr(listStructure, listPointer, false);
|
Marshal.StructureToPtr(listStructure, listPointer, false);
|
||||||
|
|
||||||
IntPtr utf8Buffer = IntPtr.Zero;
|
IntPtr utf8Buffer = IntPtr.Zero;
|
@@ -86,6 +86,6 @@ namespace Raylib_cs
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Material generic parameters (if required)
|
/// Material generic parameters (if required)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float *param;
|
public fixed float param[4];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user