public GameViewMap() { InitializeComponent(); View.UpdateCall = () => { GGraph.Update(); View.Invalidate(); UpdateViewMatrix(); GGraph.SetViewMatrix(ViewMat); //TrinityEdit.CConsole.DebugMsg("update"); //TrinityEngine.Texture.Texture2D.UpdateLoading(); }; View.RenderCall = () => { if (!resources) { resources = true; GGraph.CreateResources(); } GGraph.CenterX = View.ClientSize.Width / 2; GGraph.CenterY = View.ClientSize.Height / 2; GGraph.ViewMatrix = ViewMat; GGraph.PreRender(); GGraph.Render(); if (testc == null) { testc = new TrinityEngine.Texture.Texture2D("Content/edit/marker.png", TrinityEngine.Texture.LoadMethod.Single, true); } if (TrinityEngine.Graph.GraphNode2DMap.NM != null) { OpenTK.Vector2[] rpos = TrinityEngine.Graph.GraphNode2DMap.NM.GetRenderPos(1, 1); IntelliDraw.BeginDraw(); IntelliDraw.ViewMatrix = OpenTK.Matrix4.Identity; IntelliDraw.DrawImg((int)rpos[3].X, (int)rpos[3].Y, 20, 20, testc, new OpenTK.Vector4(1, 1, 1, 1)); IntelliDraw.EndDraw2D(); } //TrinityEdit.CConsole.DebugMsg("Rendered."); //IntelliDraw. View.AutoValidate = AutoValidate.Disable; // x = x + 1; }; CamX = CamY = 0; CamZ = 1; CamRotation = 0; }
public void beginDraw() { IntelliDraw.BeginDraw(); }