Daily update on 20231211 by nitload youmu
This commit is contained in:
@@ -22,6 +22,7 @@ namespace StgSharp
|
||||
Texture texture;
|
||||
VertexArray vao;
|
||||
VertexBuffer vbo;
|
||||
|
||||
public static unsafe void ProcessInput(IntPtr windowPtr)
|
||||
{
|
||||
if (InternalIO.glfw.GetKey(windowPtr, (int)Operation.Key.ESCAPE)
|
||||
@@ -31,7 +32,7 @@ namespace StgSharp
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deinit(object[] args)
|
||||
public override void Deinit(object[] args, IglFunc GL)
|
||||
{
|
||||
/**/
|
||||
vao.Dispose();
|
||||
@@ -47,7 +48,7 @@ namespace StgSharp
|
||||
GL.Viewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
public override void Init(object[] args)
|
||||
public override void Init(object[] args, IglFunc GL)
|
||||
{
|
||||
|
||||
InternalIO.InternalWriteLog("\n\n\n", "Program start", LogType.Info);
|
||||
@@ -92,9 +93,9 @@ namespace StgSharp
|
||||
);
|
||||
|
||||
|
||||
vao = CreateVertexArray(1);
|
||||
vbo = CreateVertexBuffer(2);
|
||||
ebo = CreateElementBuffer(1);
|
||||
vao = new VertexArray(1);
|
||||
vbo = new VertexBuffer(2);
|
||||
ebo = new ElementBuffer(1);
|
||||
texture = CreateTexture(2);
|
||||
|
||||
|
||||
@@ -142,11 +143,11 @@ namespace StgSharp
|
||||
|
||||
}
|
||||
|
||||
public override void OnRenderFrame(object[] args)
|
||||
public override void OnRenderFrame(object[] args, IglFunc GL)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnUpdateFrame(object[] args)
|
||||
public override void OnUpdateFrame(object[] args, IglFunc GL)
|
||||
{
|
||||
|
||||
ProcessInput(windowID);
|
||||
@@ -173,12 +174,18 @@ namespace StgSharp
|
||||
);
|
||||
|
||||
vao.Bind(0);
|
||||
GL.DrawElements(GepmetryType.TRIANGLES, 6, typeof(uint), IntPtr.Zero);
|
||||
|
||||
vao.BindNull();
|
||||
|
||||
InternalIO.glfw.SwapBuffers(windowID);
|
||||
InternalIO.glfw.PollEvents();
|
||||
AlignFrame(this, () =>
|
||||
{
|
||||
GL.DrawElements(GepmetryType.TRIANGLES, 6, typeof(uint), IntPtr.Zero);
|
||||
|
||||
vao.BindNull();
|
||||
|
||||
InternalIO.glfw.SwapBuffers(windowID);
|
||||
InternalIO.glfw.PollEvents();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +197,7 @@ namespace StgSharp
|
||||
try
|
||||
{
|
||||
StgSharpDemoForm demoForm = new StgSharpDemoForm();
|
||||
demoForm.ShowForm();
|
||||
demoForm.Show(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user