コード例 #1
0
            private void CreateRenderTargets(GraphicsDevice device)
            {
                int w = (int)width;
                int h = (int)height;

                // Create the diffuse texture.
                backgroundWidth  = w;
                backgroundHeight = h;
                if (BokuGame.RequiresPowerOf2)
                {
                    w = MyMath.GetNextPowerOfTwo(w);
                    h = MyMath.GetNextPowerOfTwo(h);
                }
                if (diffuse == null)
                {
                    diffuse = new RenderTarget2D(device,
                                                 w, h,
                                                 false, // Mipmaps
                                                 SurfaceFormat.Color,
                                                 DepthFormat.None);
                    InGame.GetRT("TextDialog", diffuse);
                }

                shared.dirty = true;
            }