Ejemplo n.º 1
0
        public static GameTextureInstance CreateBlank(GraphicsDevice graphicsDevice, int width, int height)
        {
            Texture2D texture = new Texture2D(graphicsDevice, width, height, false, SurfaceFormat.Color);

            Color[] colorData = new Color[width * height];
            for (int i = 0; i < colorData.Length; i++)
            {
                colorData[i] = Color.White;
            }

            texture.SetData(colorData);

            GameTextureInstance instance = new GameTextureInstance
            {
                texture = texture
            };

            return(instance);
        }
Ejemplo n.º 2
0
        public static GameTextureInstance CreateBlank(GraphicsDevice graphicsDevice, int width, int height)
        {
            Texture2D texture = new Texture2D(graphicsDevice, width, height, false, SurfaceFormat.Color);
            Color[] colorData = new Color[width * height];
            for (int i = 0; i < colorData.Length; i++)
                colorData[i] = Color.White;

            texture.SetData(colorData);

            GameTextureInstance instance = new GameTextureInstance
            {
                texture = texture
            };

            return instance;
        }