public override void Load() { _sceneEditorCamera = new GameElement("camera__sceneEditorElement"); _cameraControl = new SceneEditorCameraControl(); var camera = new GameElement("Main Camera"); camera.AttachComponent(new Camera() { ClearColor = Color4.White, ClearScreenType = ClearScreenTypes.Cubemap, Cubemap = ResourcesManager.LoadResource <Cubemap>(ResourceType.CubeMap, "Assets/Skybox/skyX/posx.png Assets/Skybox/skyX/negx.png Assets/Skybox/skyX/posy.png Assets/Skybox/skyX/negy.png Assets/Skybox/skyX/posz.png Assets/Skybox/skyX/negz.png"), Far = 3000, FieldOfView = 45, Forward = VectorHelper.Forward, IsPrimary = true, Near = 0.25f, ProjectionType = ProjectionTypes.Perspective, Viewport = RendererManager.Viewport }); _sceneEditorCamera.AttachComponent(camera.GetComponent <Camera>()); _sceneEditorCamera.AttachComponent(_cameraControl); var box = new GameElement("Box"); box.AttachComponents( new Material() { ColorAmbient = Color4.Crimson, ColorDiffuse = Color4.Crimson, ColorSpecular = Color4.White, HasColorAmbient = true, HasColorDiffuse = true, HasColorSpecular = true, ShaderProgram = new DiffuseShaderProgram() }, new MeshRenderer() { MeshFilter = MeshFactory.CreateCube(-Vector3f.One * 5, Vector3f.One * 5), Visible = true } ); box.LocalTransform.SetTranslation(0, 0, 50); GameElement light = new GameElement("Sun"); light.AttachComponents( new Light() { AmbientColor = new Color4(255, 244, 214, 255), DiffuseColor = new Color4(255, 244, 214, 255), // DiffuseColor = new Color4(202, 198, 162, 255), SpecularColor = Color4.White, Intensity = 1f, Type = LightType.Directional } ); GameElement plane = new GameElement("Plane"); plane.AttachComponents( new MeshRenderer() { MeshFilter = MeshFactory.CreatePlane(Vector2f.One * -1000, Sizef.One * 2000), Visible = true }, new Material() { TextureTilling = 50, ColorAmbient = Color4.White, HasColorAmbient = true, ColorDiffuse = Color4.White, HasColorDiffuse = true, ShaderProgram = new DiffuseShaderProgram() } ); plane.LocalTransform.SetTranslation(VectorHelper.Down * 20); AddGameElement(light); AddGameElement(plane); AddGameElement(box); AddGameElement(_sceneEditorCamera); AddRenderScript(new GizmoDrawer()); base.Load(); }