예제 #1
0
        //============================================================
        // <T>设置渲染过程。</T>
        //============================================================
        public override void Setup()
        {
            base.Setup();
            SIntSize size = new SIntSize(2048, 2048);

            // 创建深度检测区
            _depthTexture.Device = _device;
            _depthTexture.Create(size.Width, size.Height);
            // 创建渲染目标纹理区 (颜色,透明度)
            _lineTexture.Device       = _device;
            _lineTexture.NativeFormat = Format.R8G8B8A8_UNorm;
            _lineTexture.Create(size.Width, size.Height);
        }
예제 #2
0
        //============================================================
        // <T>设置渲染过程。</T>
        //============================================================
        public override void Setup()
        {
            base.Setup();
            SIntSize size = new SIntSize(2048, 2048);
            FObjects <FDxBufferedTexture> textures = new FObjects <FDxBufferedTexture>();

            // 创建深度检测区
            _depthTexture.Device = _device;
            _depthTexture.Create(size.Width, size.Height);
            // 创建渲染目标纹理区 (标识)
            _textureFlags.Device       = _device;
            _textureFlags.NativeFormat = Format.R32G32B32A32_SInt;
            _textureFlags.Create(size.Width, size.Height);
            textures.Push(_textureFlags);
            // 创建渲染目标纹理区 (颜色,透明度)
            _textureColor.Device       = _device;
            _textureColor.NativeFormat = Format.R8G8B8A8_UNorm;
            _textureColor.Create(size.Width, size.Height);
            textures.Push(_textureColor);
            // 建立纹理列表
            _targets = textures.ToArray();
        }