New IO structure, unexpexted error in C code
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
using StgSharp.Graphics.GL;
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
@@ -18,18 +14,18 @@ namespace StgSharp.Graphics
|
||||
public string name;
|
||||
}
|
||||
|
||||
public unsafe class Form:INode<Form>
|
||||
public unsafe class Form
|
||||
{
|
||||
internal IntPtr windowPtr;
|
||||
internal formInfo info;
|
||||
internal shaderObject shader;
|
||||
internal IntPtr shader;
|
||||
internal LinkedList<Pool> allControl;
|
||||
|
||||
public vec2d Size
|
||||
{
|
||||
get { return new vec2d(info.width,info.height); }
|
||||
set
|
||||
{
|
||||
get { return new vec2d(info.width, info.height); }
|
||||
set
|
||||
{
|
||||
info.width = (int)value.X;
|
||||
info.height = (int)value.Y;
|
||||
}
|
||||
@@ -41,7 +37,7 @@ namespace StgSharp.Graphics
|
||||
set => info.width = value;
|
||||
}
|
||||
|
||||
public int Height
|
||||
public int Height
|
||||
{
|
||||
get => info.height;
|
||||
set => info.height = value;
|
||||
@@ -69,18 +65,16 @@ namespace StgSharp.Graphics
|
||||
//used for internal control purpose
|
||||
internal Form(int instruction)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
internal unsafe void defualtInit()
|
||||
{
|
||||
fixed (shaderObject* shaderObj = &this.shader)
|
||||
{
|
||||
IntPtr windowPtr = Graphic.InitWindow(this);
|
||||
internalIO.InternalCompileShader(shaderObj);
|
||||
internalIO.InternalRenderWindow(windowPtr, this.info, shaderObj);
|
||||
internalIO.TerminateWindow(shaderObj);
|
||||
}
|
||||
IntPtr windowPtr = Graphic.InitWindow(this);
|
||||
internalIO.InternalCompileShader((shaderObject*)this.shader);
|
||||
internalIO.InternalRenderWindow(windowPtr, this.info, (shaderObject*)this.shader);
|
||||
internalIO.TerminateWindow((shaderObject*)shader);
|
||||
|
||||
}
|
||||
|
||||
public virtual void Init()
|
||||
@@ -93,12 +87,9 @@ namespace StgSharp.Graphics
|
||||
|
||||
public void Show()
|
||||
{
|
||||
fixed (shaderObject* shaderObj = &this.shader)
|
||||
{
|
||||
internalIO.InternalCompileShader(shaderObj);
|
||||
internalIO.InternalRenderWindow(this.windowPtr, this.info, shaderObj);
|
||||
internalIO.TerminateWindow(shaderObj);
|
||||
}
|
||||
internalIO.InternalCompileShader((shaderObject*)shader);
|
||||
internalIO.InternalRenderWindow(this.windowPtr, this.info, (shaderObject*)shader);
|
||||
internalIO.TerminateWindow((shaderObject*)shader);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user