private void Initialize() { //var backgroundColorStandard = new Color4(0.7f, 0.7f, 0.7f, 1.0f); var backgroundColorStandard = new Color4(0.157f, 0.157f, 0.157f, 1.0f); _backgroundManager = new BackgroundManager(backgroundColorStandard); _screenBufferManager = new ScreenBufferManager(_backgroundManager); _viewportManager = new ViewportManager(_control); _textureProvider = new TextureProvider(); _shaderProvider = new ShaderProvider(); _sceneManager = new SceneManager(new Scene("Main")); WorldAxes.AddAxesToNode(_shaderProvider, _sceneManager.CurrentScene); _camera = new Camera(_viewportManager); _camMovement = new CameraMovement(_camera, _control); _renderLoop = new RenderLoop(_control, _screenBufferManager, _sceneManager, _camera, _shaderProvider); _grid = new Grid(_camera, _renderLoop, new LineRenderer(_shaderProvider.DefaultShader)); _simulation = new JellySimulation(_sceneManager, _shaderProvider); _jellyInput = new JellyInput(_simulation.Jelly, _simulation.ControlFrame, _control, _camera); _window.tessellationParametersView.DataContext = Registry.TessellationLevels; _window.meshSelector.Initialize(_simulation); _window.polygonFillView.Initialize(); }
public RenderLoop(GLControl glControl, ScreenBufferManager screenBufferManager, SceneManager sceneManager, Camera camera, ShaderProvider shaderProvider) { _glControl = glControl; _screenBufferManager = screenBufferManager; _sceneManager = sceneManager; _camera = camera; _shaderProvider = shaderProvider; Initialize(); }