@@ -20,6 +20,8 @@ protected Buffer()
2020 public int Count { get ; protected set ; }
2121
2222 public int SizeInBytes { get ; private set ; }
23+
24+ public bool IsMappable { get ; private set ; }
2325
2426 public void Dispose ( )
2527 {
@@ -31,6 +33,7 @@ public void AllocateStorage(int sizeInBytes, StorageAllocationFlags storageAlloc
3133 GL . NamedBufferStorage ( Id , sizeInBytes , nint . Zero , storageAllocationFlags . ToGL ( ) ) ;
3234 SizeInBytes = sizeInBytes ;
3335 Count = SizeInBytes / Stride ;
36+ IsMappable = storageAllocationFlags . HasFlag ( StorageAllocationFlags . Mappable ) ;
3437 }
3538
3639 public void AllocateStorage < TElement > ( TElement element , StorageAllocationFlags storageAllocationFlags )
@@ -39,6 +42,7 @@ public void AllocateStorage<TElement>(TElement element, StorageAllocationFlags s
3942 GL . NamedBufferStorage ( Id , element , storageAllocationFlags . ToGL ( ) ) ;
4043 Count = 1 ;
4144 SizeInBytes = Marshal . SizeOf < TElement > ( ) ;
45+ IsMappable = storageAllocationFlags . HasFlag ( StorageAllocationFlags . Mappable ) ;
4246 }
4347
4448 public void AllocateStorage < TElement > ( TElement [ ] elements , StorageAllocationFlags storageAllocationFlags )
@@ -47,6 +51,7 @@ public void AllocateStorage<TElement>(TElement[] elements, StorageAllocationFlag
4751 GL . NamedBufferStorage ( Id , elements , storageAllocationFlags . ToGL ( ) ) ;
4852 Count = elements . Length ;
4953 SizeInBytes = Marshal . SizeOf < TElement > ( ) * Count ;
54+ IsMappable = storageAllocationFlags . HasFlag ( StorageAllocationFlags . Mappable ) ;
5055 }
5156
5257 public unsafe void Update ( nint dataPtr , int offsetInBytes , int sizeInBytes )
0 commit comments