static void Main(string[] args) { QuadEngine.QuadEngine.CreateQuadDevice(out quadDevice); quadDevice.CreateWindow(out quadWindow); quadWindow.SetCaption("QuadEngine - Demo06 - Deffered shading"); quadWindow.SetSize(800, 600); quadWindow.SetPosition(100, 100); quadDevice.CreateRender(out quadRender); quadRender.Initialize((IntPtr)(int)(uint)quadWindow.GetHandle(), 800, 600, false); quadDevice.CreateAndLoadTexture(0, "data\\Diffuse.jpg", out diff); quadDevice.CreateAndLoadTexture(0, "data\\Diffuse.jpg", out texture); texture.LoadFromFile(1, "data\\Normal.jpg"); texture.LoadFromFile(2, "data\\Specular.jpg"); texture.LoadFromFile(3, "data\\Bump.jpg"); quadDevice.CreateGBuffer(out quadGBuffer); quadDevice.CreateCamera(out camera); quadWindow.CreateInput(out quadInput); quadDevice.CreateTimer(out quadTimer); timer = (TimerProcedure)OnTimer; quadTimer.SetCallBack(Marshal.GetFunctionPointerForDelegate(timer)); quadTimer.SetInterval(16); quadTimer.SetState(true); quadWindow.Start(); }
static void Main(string[] args) { QuadEngine.QuadEngine.CreateQuadDevice(out quadDevice); quadDevice.CreateWindow(out quadWindow); quadWindow.SetCaption("QuadEngine - Demo05 - Cursor and Camera"); quadWindow.SetSize(800, 600); quadWindow.CreateInput(out quadInput); quadDevice.CreateRender(out quadRender); quadRender.Initialize((IntPtr)(int)(uint)quadWindow.GetHandle(), 800, 600, false); quadDevice.CreateAndLoadTexture(0, "data\\quadlogo.png", out quadLogoTexture); quadDevice.CreateAndLoadTexture(0, "data\\cursor.png", out cursorTexture); quadDevice.ShowCursor(true); quadDevice.SetCursorProperties(0, 0, cursorTexture); quadDevice.CreateCamera(out quadCamera); quadCamera.SetPosition(new Vec2f(-WINDOW_WIDTH, -WINDOW_HEIGHT)); quadDevice.CreateTimer(out quadTimer); timer = (TimerProcedure)OnTimer; quadTimer.SetCallBack(Marshal.GetFunctionPointerForDelegate(timer)); quadTimer.SetInterval(16); quadTimer.SetState(true); quadWindow.Start(); }
public Form1() { InitializeComponent(); this.SetClientSizeCore(800, 600); QuadEngine.QuadEngine.CreateQuadDevice(out quadDevice); quadDevice.CreateRender(out quadRender); quadRender.Initialize(this.Handle, 800, 600, false); quadDevice.CreateTimer(out quadTimer); timer = (TimerProcedure)OnTimer; quadTimer.SetCallBack(Marshal.GetFunctionPointerForDelegate(timer)); quadTimer.SetInterval(200); quadTimer.SetState(true); }
static void Main(string[] args) { QuadEngine.QuadEngine.CreateQuadDevice(out quadDevice); quadDevice.CreateWindow(out quadWindow); quadWindow.SetCaption("QuadEngine - Demo02 - Window"); quadWindow.SetSize(800, 600); quadDevice.CreateRender(out quadRender); quadRender.Initialize((IntPtr)(int)(uint)quadWindow.GetHandle(), 800, 600, false); quadDevice.CreateTimer(out quadTimer); timer = (TimerProcedure)OnTimer; quadTimer.SetCallBack(Marshal.GetFunctionPointerForDelegate(timer)); quadTimer.SetInterval(200); quadTimer.SetState(true); quadWindow.Start(); }
static void Main(string[] args) { QuadEngine.QuadEngine.CreateQuadDevice(out quadDevice); quadDevice.CreateWindow(out quadWindow); quadWindow.SetCaption("QuadEngine - Demo07 - Fonts"); quadWindow.SetSize(800, 600); quadWindow.SetPosition(100, 100); quadDevice.CreateRender(out quadRender); quadRender.Initialize((IntPtr)(int)(uint)quadWindow.GetHandle(), 800, 600, false); quadDevice.CreateAndLoadFont("data\\font.png", "data\\font.qef", out quadFont); quadDevice.CreateTimer(out quadTimer); timer = (TimerProcedure)OnTimer; quadTimer.SetCallBack(Marshal.GetFunctionPointerForDelegate(timer)); quadTimer.SetInterval(16); quadTimer.SetState(true); quadWindow.Start(); }