daily uodate on 20240626 by nitload youmu

This commit is contained in:
Nitload
2024-06-26 07:33:12 +08:00
parent b2cb0cbddf
commit 8f9f1c4012
44 changed files with 722 additions and 383 deletions
+23 -1
View File
@@ -34,6 +34,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
@@ -42,7 +43,9 @@ namespace StgSharp.Graphics
public class ViewPort
{
private int _width, _height;
private FrameBufferSizeHandler _sizeHandler;
private FramePositionHandler _positionHandler;
internal ViewPort()
{
_height = 800;
@@ -119,5 +122,24 @@ namespace StgSharp.Graphics
}
}
public FrameBufferSizeHandler FrameSizeCallback
{
set
{
_sizeHandler = value;
IntPtr handlerPtr = Marshal.GetFunctionPointerForDelegate(_sizeHandler);
InternalIO.glfwSetFramebufferSizeCallback(ViewPortID, handlerPtr);
}
}
public FramePositionHandler FramePostionCallback
{
set
{
_positionHandler = value;
IntPtr handlerPtr = Marshal.GetFunctionPointerForDelegate(_positionHandler);
InternalIO.glfwSetWindowPosCallback(ViewPortID,handlerPtr);
}
}
}
}