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);
|
ImageUtils.ImageInfoFromFile(imagePath, out var width, out var height, out var sizeInBytes);
|
||||||
var texture = Texture.CreateTexture2D(graphicsDevice, width, height, TextureFormat.R8G8B8A8, TextureUsageFlags.Sampler);
|
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(
|
ImageUtils.DecodeIntoTransferBuffer(
|
||||||
imagePath,
|
imagePath,
|
||||||
cpuBuffer,
|
transferBuffer,
|
||||||
0,
|
0,
|
||||||
SetDataOptions.Overwrite
|
SetDataOptions.Overwrite
|
||||||
);
|
);
|
||||||
|
|
||||||
commandBuffer.BeginCopyPass();
|
commandBuffer.BeginCopyPass();
|
||||||
commandBuffer.UploadToTexture(
|
commandBuffer.UploadToTexture(
|
||||||
cpuBuffer,
|
transferBuffer,
|
||||||
texture
|
texture
|
||||||
);
|
);
|
||||||
commandBuffer.EndCopyPass();
|
commandBuffer.EndCopyPass();
|
||||||
|
|
||||||
cpuBuffer.Dispose();
|
transferBuffer.Dispose();
|
||||||
NativeMemory.Free(fontFileByteBuffer);
|
NativeMemory.Free(fontFileByteBuffer);
|
||||||
NativeMemory.Free(atlasFileByteBuffer);
|
NativeMemory.Free(atlasFileByteBuffer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue