Package icyllis.arc3d.opengl
Class GLBuffer
java.lang.Object
icyllis.arc3d.engine.Resource
icyllis.arc3d.engine.Buffer
icyllis.arc3d.opengl.GLBuffer
- All Implemented Interfaces:
RefCounted
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.arc3d.engine.Buffer
Buffer.ResourceKey -
Field Summary
Fields inherited from class icyllis.arc3d.engine.Buffer
kRead_MapMode, kWriteDiscard_MapMode, mSize, mUsage -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddoUploadData(GLDevice device, int buffer, int target, long data, long offset, long totalSize) intstatic intgetBufferStorageFlags(int usage) longprotected GLDeviceintstatic intgetMutableBufferUsage(int usage) intReturns a default target for this buffer.static @Nullable @SharedPtr GLBufferprotected longonMap(int mode, long offset, long size) protected voidSubclass should override this method to free GPU resources in the backend API.protected voidonSetLabel(@Nullable String label) Subclass should override this method to set object label in the backend API.protected voidonUnmap(int mode, long offset, long size) Methods inherited from class icyllis.arc3d.engine.Buffer
getMappedBuffer, getSize, getUsage, isMapped, map, map, unmap, unmap, updateDataMethods inherited from class icyllis.arc3d.engine.Resource
getContext, getKey, getLabel, getMemorySize, getUniqueID, hasAnyRefs, hasCacheRef, hasCommandBufferRef, hasUsageRef, isBudgeted, isDestroyed, isPurgeable, isShareable, isWrapped, ref, refCommandBuffer, setLabel, setNonCacheable, unref, unrefCommandBuffer
-
Method Details
-
make
-
getBufferStorageFlags
public static int getBufferStorageFlags(int usage) -
getMutableBufferUsage
public static int getMutableBufferUsage(int usage) -
getHandle
public int getHandle() -
getClientUploadBuffer
public long getClientUploadBuffer() -
getTarget
public int getTarget()Returns a default target for this buffer. -
getBindingTarget
public int getBindingTarget() -
onSetLabel
Description copied from class:ResourceSubclass should override this method to set object label in the backend API.- Overrides:
onSetLabelin classResource
-
onRelease
protected void onRelease()Description copied from class:ResourceSubclass should override this method to free GPU resources in the backend API. -
getDevice
-
onMap
protected long onMap(int mode, long offset, long size) -
onUnmap
protected void onUnmap(int mode, long offset, long size) -
doUploadData
public static void doUploadData(GLDevice device, int buffer, int target, long data, long offset, long totalSize)
-