Esempio n. 1
0
        protected void Init()
        {
            DrawFontToBitmap();
            MappedTexture2D mt = LockFontBitmap(Format.R8G8B8A8_UNORM);

            texture = device.CreateTexture2D(new Texture2DDesc
            {
                ArraySize      = 1,
                BindFlags      = BindFlags.ShaderResource,
                CPUAccessFlags = CpuAccessFlags.None,
                Format         = Format.R8G8B8A8_UNORM,
            }, new MappedTexture2D[] { mt });

            UnlockFontBitmap();
            DisposeBitmap();
        }