Ejemplo n.º 1
0
        public static void Main()
        {
            _window = new GameWindow(GameWindowSettings.Default, _nativeWindowSettings);
            var isNetworkGraph = false;

            if (isNetworkGraph)
            {
                // var graphData = TestGraphGenerator.GenerateNetworkGraph();
                // _graph = new NetworkGraph<string>(graphData);
            }
            else
            {
                _graph = ScatterGraphGenerator.GenerateScatterGraph();
            }

            var aspect = (float)_window.ClientSize.X / _window.ClientSize.Y;

            _graph.State.Camera.Target.AspectRatio  = aspect;
            _graph.State.Camera.Current.AspectRatio = aspect;

            _control = new GraphGlfwWindowControl <string>(_window, _graph.State);
            _control.BindToEvents();

            GLDebugLog.Message  += OnMessage;
            _window.RenderFrame += OnRenderFrame;
            _window.UpdateFrame += OnUpdate;
            _window.Run();
        }
Ejemplo n.º 2
0
        public static void Main()
        {
            _window = new GameWindow(GameWindowSettings.Default, _nativeWindowSettings);

            var cfg = NetworkGraphConfig.Default;

            cfg.LabelDisplayMode = LabelDisplayMode.SelectedAndAdjacent;
            _graph = NetGraphGenerator.GenerateNetworkGraph(cfg);

            var aspect = (float)_window.ClientSize.X / _window.ClientSize.Y;

            _graph.Camera.Target.AspectRatio  = aspect;
            _graph.Camera.Current.AspectRatio = aspect;

            _control = new GraphGlfwWindowControl <string>(_window, _graph.State);
            _control.BindToEvents();

            GLDebugLog.Message  += OnMessage;
            _window.RenderFrame += OnRenderFrame;
            _window.UpdateFrame += OnUpdate;
            _window.Run();
        }