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 void
doUploadData
(GLDevice device, int buffer, int target, long data, long offset, long totalSize) int
static int
getBufferStorageFlags
(int usage) long
protected GLDevice
int
static int
getMutableBufferUsage
(int usage) int
Returns a default target for this buffer.static @SharedPtr GLBuffer
protected long
onMap
(int mode, long offset, long size) protected void
Subclass should override this method to free GPU resources in the backend API.protected void
onSetLabel
(String label) Subclass should override this method to set object label in the backend API.protected void
onUnmap
(int mode, long offset, long size) Methods inherited from class icyllis.arc3d.engine.Buffer
getMappedBuffer, getSize, getUsage, isMapped, map, map, unmap, unmap, updateData
Methods inherited from class icyllis.arc3d.engine.Resource
getContext, getKey, getLabel, getMemorySize, getUniqueID, hasAnyRefs, hasCacheRef, hasCommandBufferRef, hasUsageRef, isBudgeted, isDestroyed, isPurgeable, isWrapped, ref, refCommandBuffer, setKey, 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:Resource
Subclass should override this method to set object label in the backend API.- Overrides:
onSetLabel
in classResource
-
onRelease
protected void onRelease()Description copied from class:Resource
Subclass 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)
-