Package icyllis.arc3d.vulkan
Class VulkanImage
java.lang.Object
icyllis.arc3d.engine.Resource
icyllis.arc3d.engine.Image
icyllis.arc3d.vulkan.VulkanImage
- All Implemented Interfaces:
RefCounted
Represents Vulkan images, can be used as textures or attachments.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final class -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionVulkanImage(Context context, VulkanImageDesc desc, VulkanImageMutableState mutableState, long image, VulkanAllocation memoryAlloc, boolean budgeted, boolean wrapped) -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanImage.CreatedImageInfocreate(VulkanDevice device, VulkanImageDesc desc) Create Vulkan image and allocate its device memory.static @SharedPtr VulkanImagemake(Context context, VulkanImageDesc desc, boolean budgeted) protected voidSubclass should override this method to free GPU resources in the backend API.toString()longvkImage()Methods inherited from class icyllis.arc3d.engine.Image
getArraySize, getDepth, getDepthBits, getDesc, getHeight, getImageType, getMipLevelCount, getMutableState, getSampleCount, getStencilBits, getWidth, isMipmapped, isMipmapsDirty, isProtected, isReadOnly, isRenderable, isSampledImage, isStorageImage, setMipmapsDirty, setReleaseCallbackMethods inherited from class icyllis.arc3d.engine.Resource
getContext, getDevice, getKey, getLabel, getMemorySize, getUniqueID, hasAnyRefs, hasCacheRef, hasCommandBufferRef, hasUsageRef, isBudgeted, isDestroyed, isPurgeable, isWrapped, onSetLabel, ref, refCommandBuffer, setKey, setLabel, setNonCacheable, unref, unrefCommandBuffer
-
Constructor Details
-
VulkanImage
public VulkanImage(Context context, VulkanImageDesc desc, VulkanImageMutableState mutableState, long image, VulkanAllocation memoryAlloc, boolean budgeted, boolean wrapped)
-
-
Method Details
-
create
@Nullable public static VulkanImage.CreatedImageInfo create(VulkanDevice device, VulkanImageDesc desc) Create Vulkan image and allocate its device memory.- Returns:
- created image or null if failed
-
make
@Nullable @SharedPtr public static @SharedPtr VulkanImage make(@Nonnull Context context, @Nonnull VulkanImageDesc desc, boolean budgeted) -
vkImage
public long vkImage() -
onRelease
protected void onRelease()Description copied from class:ResourceSubclass should override this method to free GPU resources in the backend API. -
toString
-