rename cpuBuffer to transferBuffer in Font
parent
8648eef5d1
commit
0a5ec9e82d
|
@ -51,22 +51,22 @@ namespace MoonWorks.Graphics.Font
|
|||
ImageUtils.ImageInfoFromFile(imagePath, out var width, out var height, out var sizeInBytes);
|
||||
var texture = Texture.CreateTexture2D(graphicsDevice, width, height, TextureFormat.R8G8B8A8, TextureUsageFlags.Sampler);
|
||||
|
||||
var cpuBuffer = new TransferBuffer(graphicsDevice, sizeInBytes);
|
||||
var transferBuffer = new TransferBuffer(graphicsDevice, sizeInBytes);
|
||||
ImageUtils.DecodeIntoTransferBuffer(
|
||||
imagePath,
|
||||
cpuBuffer,
|
||||
transferBuffer,
|
||||
0,
|
||||
SetDataOptions.Overwrite
|
||||
);
|
||||
|
||||
commandBuffer.BeginCopyPass();
|
||||
commandBuffer.UploadToTexture(
|
||||
cpuBuffer,
|
||||
transferBuffer,
|
||||
texture
|
||||
);
|
||||
commandBuffer.EndCopyPass();
|
||||
|
||||
cpuBuffer.Dispose();
|
||||
transferBuffer.Dispose();
|
||||
NativeMemory.Free(fontFileByteBuffer);
|
||||
NativeMemory.Free(atlasFileByteBuffer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue