daily uodate on 20240626 by nitload youmu[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[p
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user