Beispiel #1
0
        public Image(Size <int> size, PixelFormat pixelFormat, GpuDevice device)
        {
            mDevice = device;

            //do not need to create texture, because the size is zero
            if (size.Width == 0 || size.Height == 0)
            {
                return;
            }

            mTexture = new GpuTexture2D(size, (GpuPixelFormat)pixelFormat, device,
                                        new GpuResourceInfo(GpuBindUsage.ShaderResource | GpuBindUsage.RenderTarget));
        }