public void InitializeSystem() { // Create a Default camera m_editorCamera = new Camera(); m_editorCamera.ClearColor = new Color(0.4f, 0.1f, 1f, 1f); EditorCameraMovement camMovement = new EditorCameraMovement(); camMovement.Camera = m_editorCamera; m_world.RegisterComponent(camMovement); m_cameraList.Add(m_editorCamera); // Create a shader for drawing debug primitives/instances. m_debugShader = new Shader("DebugPrimitives"); m_debugShader.CompileSource(File.ReadAllText("RenderSystem/Shaders/DebugPrimitive.frag"), ShaderType.FragmentShader); m_debugShader.CompileSource(File.ReadAllText("RenderSystem/Shaders/DebugPrimitive.vert"), ShaderType.VertexShader); m_debugShader.LinkShader(); }
public void ShutdownSystem() { UnloadAll(); m_debugShader.Dispose(); m_debugShader = null; }