public bool Render() { D3D.BeginScene(0.0f, 0f, 0f, 1.0f); Camera.Render(); foreach (BaseShader Shader in RenderStorageSingleton.Instance.ShaderManager.shaders.Values) { Shader.InitCBuffersFrame(D3D.DeviceContext, Camera, WorldSettings); } foreach (IRenderer RenderEntry in Assets.Values) { RenderEntry.UpdateBuffers(D3D.Device, D3D.DeviceContext); RenderEntry.Render(D3D.Device, D3D.DeviceContext, Camera); } //navigationGrids[0].Render(D3D.Device, D3D.DeviceContext, Camera); foreach (var grid in navigationGrids) { grid.Render(D3D.Device, D3D.DeviceContext, Camera); } translokatorGrid.Render(D3D.Device, D3D.DeviceContext, Camera); selectionBox.UpdateBuffers(D3D.Device, D3D.DeviceContext); selectionBox.Render(D3D.Device, D3D.DeviceContext, Camera); TranslationGizmo.UpdateBuffers(D3D.Device, D3D.DeviceContext); TranslationGizmo.Render(D3D.Device, D3D.DeviceContext, Camera); clouds.UpdateBuffers(D3D.Device, D3D.DeviceContext); clouds.Render(D3D.Device, D3D.DeviceContext, Camera); sky.DoRender = WorldSettings.RenderSky; sky.UpdateBuffers(D3D.Device, D3D.DeviceContext); sky.Render(D3D.Device, D3D.DeviceContext, Camera); D3D.EndScene(); return(true); }
public bool Render() { D3D.BeginScene(0.0f, 0f, 0f, 1.0f); Camera.Render(); foreach (KeyValuePair <ulong, BaseShader> shader in RenderStorageSingleton.Instance.ShaderManager.shaders) { shader.Value.InitCBuffersFrame(D3D.DeviceContext, Camera, Light); } foreach (KeyValuePair <int, IRenderer> entry in Assets) { entry.Value.UpdateBuffers(D3D.Device, D3D.DeviceContext); entry.Value.Render(D3D.Device, D3D.DeviceContext, Camera, Light); } D3D.EndScene(); return(true); }