Пример #1
0
        private void InitD3D()
        {
            _dxDevice = new Device(DriverType.Hardware, DeviceCreationFlags.Debug | DeviceCreationFlags.BgraSupport, FeatureLevel.Level_10_0);

            EnsureOutputBuffers();

            FontDescription fontDesc = new FontDescription
            {
                Height         = 24,
                Width          = 0,
                Weight         = 0,
                MipLevels      = 1,
                IsItalic       = false,
                CharacterSet   = FontCharacterSet.Default,
                Precision      = FontPrecision.Default,
                Quality        = FontQuality.Default,
                PitchAndFamily = FontPitchAndFamily.Default | FontPitchAndFamily.DontCare,
                FaceName       = "Times New Roman"
            };

            _dxFont = new Font(_dxDevice, fontDesc);

            _textureManager = new DxTextureManager(_dxDevice);

//            _dxEffect = new DxEffect(_dxDevice);
            _dxCube = new DxCube(_dxDevice);
            CrateKinectPointsRenderer(KinectPointsRendererType.Billboard);

            ShaderResourceView texArray = _textureManager.CreateTexArray("flares", @"Assets\flare0.dds");

            _fire = new DxParticleSystemRenderer(_dxDevice, texArray, 500);

            _dxDevice.Flush();
        }
Пример #2
0
        private void InitD3D()
        {
            _dxDevice = new Device(DriverType.Hardware, DeviceCreationFlags.Debug | DeviceCreationFlags.BgraSupport, FeatureLevel.Level_10_0);

            EnsureOutputBuffers();

            FontDescription fontDesc = new FontDescription
                                           {
                                               Height = 24,
                                               Width = 0,
                                               Weight = 0,
                                               MipLevels = 1,
                                               IsItalic = false,
                                               CharacterSet = FontCharacterSet.Default,
                                               Precision = FontPrecision.Default,
                                               Quality = FontQuality.Default,
                                               PitchAndFamily = FontPitchAndFamily.Default | FontPitchAndFamily.DontCare,
                                               FaceName = "Times New Roman"
                                           };

            _dxFont = new Font(_dxDevice, fontDesc);

            _textureManager = new DxTextureManager(_dxDevice);

            //            _dxEffect = new DxEffect(_dxDevice);
            _dxCube = new DxCube(_dxDevice);
            CrateKinectPointsRenderer(KinectPointsRendererType.Billboard);

            ShaderResourceView texArray = _textureManager.CreateTexArray("flares", @"Assets\flare0.dds");
            _fire = new DxParticleSystemRenderer(_dxDevice, texArray, 500);

            _dxDevice.Flush();
        }