fix: centralized version data in Directory.build.props, and fixed various interop details that had incorrect function signatures
This commit is contained in:
parent
c99ce8edea
commit
3b305013a1
11 changed files with 169 additions and 105 deletions
|
|
@ -186,6 +186,14 @@ public static unsafe partial class Raylib
|
|||
/// <summary>Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)</summary>
|
||||
public static void TraceLog(TraceLogLevel logLevel, string text)
|
||||
{
|
||||
// raylib's TraceLog is variadic (const char *text, ...). WebAssembly cannot invoke
|
||||
// variadic C functions from managed code (traps with "function signature mismatch").
|
||||
if (OperatingSystem.IsBrowser())
|
||||
{
|
||||
Console.WriteLine(text);
|
||||
return;
|
||||
}
|
||||
|
||||
using Utf8Buffer str1 = text.ToUtf8Buffer();
|
||||
TraceLog(logLevel, str1.AsPointer());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,19 @@ namespace Raylib_cs;
|
|||
|
||||
public static unsafe partial class Rlgl
|
||||
{
|
||||
/// <summary>Load depth texture/renderbuffer (to be attached to fbo)</summary>
|
||||
public static uint LoadTextureDepth(int width, int height, bool useRenderBuffer) =>
|
||||
LoadTextureDepth(width, height, useRenderBuffer ? 1 : 0);
|
||||
|
||||
/// <summary>Attach texture/renderbuffer to a framebuffer</summary>
|
||||
public static void FramebufferAttach(
|
||||
uint fboId,
|
||||
uint texId,
|
||||
FramebufferAttachType attachType,
|
||||
FramebufferAttachTextureType texType,
|
||||
int mipLevel
|
||||
) => FramebufferAttach(fboId, texId, (int)attachType, (int)texType, mipLevel);
|
||||
|
||||
/// <summary>Set shader value matrices</summary>
|
||||
public static void SetUniformMatrices(int locIndex, Matrix4x4[] mat)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue