コード例 #1
0
ファイル: Direct3DCoreWindow.cs プロジェクト: zumpiez/ankh
        void IFrameworkView.Initialize(CoreApplicationView applicationView)
        {
            applicationView.Activated += OnActivated;

            _device = game.Device as MetroGraphicsDevice;
            //_device = new MetroGraphicsDevice();
        }
コード例 #2
0
            public Texture(MetroGraphicsDevice dev, int width, int height)
            {
                this.dev = dev;

                var format = new D3D11.Texture2DDescription
                {
                    Format = DXGI.Format.R8G8B8A8_UNorm,
                    Width = width,
                    Height = height,
                    ArraySize = 1,
                    MipLevels = 1,
                    BindFlags = D3D11.BindFlags.ShaderResource,
                    SampleDescription = new DXGI.SampleDescription { Count = 1 }
                };

                // Allocate a 2-D surface as the depth/stencil buffer.
                tex = new D3D11.Texture2D(dev._device, format);
            }
コード例 #3
0
ファイル: Main.cs プロジェクト: zumpiez/ankh
 public static void Main(string[] args)
 {
     var device = new Ankh.Platform.Metro.MetroGraphicsDevice();
     var game = new DefenetronGame(device);
     Direct3DCoreWindowMain.Run(game);
 }