Esempio n. 1
0
        public void OnLoad()
        {
            var dir = Directory.GetCurrentDirectory();
            ResourceGroupManager.Singleton.AddResourceLocation(dir, "FileSystem");
            MaterialManager.Singleton.Initialise();

            _scene = _root.CreateSceneManager("DefaultSceneManager", "SLSharpInstance");
            _scene.ClearScene();

            Bindings.MOGRE.SLSharp.Init();
            Shader.DebugMode = true;

            //Shader.DebugMode = true;

            _clipmap = new Clipmap(_scene);
            RecalcHeight();

            _camera = _scene.CreateCamera("MainCamera");
            _camera.Position = new Vector3(0, 0, 5);
            _camera.LookAt(Vector3.ZERO);
            _camera.NearClipDistance = 0.001f;
            _camera.FarClipDistance = 20.0f;
            _camera.AutoAspectRatio = true;

            var vp = _window.AddViewport(_camera);
            vp.BackgroundColour = ColourValue.Blue;
        }
Esempio n. 2
0
        public ClipmapLevel(float scale, int scaleInt, Clipmap clipmap)
        {
            _d = clipmap.DValue;
            _n = _d - 1;

            _clipmap = clipmap;
            Scale    = scale;
            ScaleInt = scaleInt;

            Heightmap = TextureManager.Singleton.CreateManual("Level_" + scaleInt, ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, TextureType.TEX_TYPE_2D, (uint)_d, (uint)_d, 0, PixelFormat.PF_FLOAT32_RGB);
        }
Esempio n. 3
0
        public ClipmapLevel(float scale, int scaleInt, Clipmap clipmap)
        {
            _d = clipmap.DValue;
            _n = _d - 1;

            _clipmap = clipmap;
            Scale = scale;
            ScaleInt = scaleInt;

            Heightmap = TextureManager.Singleton.CreateManual("Level_" + scaleInt, ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, TextureType.TEX_TYPE_2D, (uint)_d, (uint)_d, 0, PixelFormat.PF_FLOAT32_RGB);
        }