3 using SiliconStudio.Core;
4 using SiliconStudio.Core.Serialization.Assets;
5 using SiliconStudio.Core.Serialization.Converters;
7 namespace SiliconStudio.
Paradox.Graphics.Data
13 var services = converterContext.Tags.Get(ServiceRegistry.ServiceRegistryKey);
16 buffer = Buffer.New(graphicsDeviceService.GraphicsDevice, data.Content, data.StructureByteStride,
data.BufferFlags, PixelFormat.None, data.Usage);
22 if (assetManager.TryGetAssetUrl(data, out url))
24 buffer.Reload = (graphicsResource) =>
27 var loadedBufferData = assetManager.Load<
BufferData>(url);
28 ((
Buffer)graphicsResource).Recreate(loadedBufferData.Content);
29 assetManager.Unload(loadedBufferData);
Service providing method to access GraphicsDevice life-cycle.
override void ConvertFromData(ConverterContext converterContext, BufferData data, ref Buffer buffer)
Base class for converters to/from a data type.
Interface of the asset manager.
BufferFlags BufferFlags
Buffer flags describing the type of buffer.
int StructureByteStride
The size of the structure (in bytes) when it represents a structured/typed buffer.
All-in-One Buffer class linked SharpDX.Direct3D11.Buffer.
SiliconStudio.Paradox.Graphics.Buffer Buffer
GraphicsResourceUsage Usage
Usage of this buffer.
override void ConvertToData(ConverterContext converterContext, ref BufferData data, Buffer obj)
readonly BufferDescription Description
Gets the description of this buffer.
Only valid for a property / field that has a class or struct type. When restored, instead of recreati...
Content of a GPU buffer (vertex buffer, index buffer, etc...).