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 wrapped) -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable VulkanImage.CreatedImageInfocreate(VulkanDevice device, VulkanImageDesc desc) Create Vulkan image and allocate its device memory.static @Nullable @SharedPtr VulkanImagemake(@NonNull Context context, @NonNull VulkanImageDesc desc) 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, isShareable, isWrapped, onSetLabel, ref, refCommandBuffer, setLabel, setNonCacheable, unref, unrefCommandBuffer
-
Constructor Details
-
VulkanImage
public VulkanImage(Context context, VulkanImageDesc desc, VulkanImageMutableState mutableState, long image, VulkanAllocation memoryAlloc, boolean wrapped)
-
-
Method Details
-
create
public static @Nullable VulkanImage.CreatedImageInfo create(VulkanDevice device, VulkanImageDesc desc) Create Vulkan image and allocate its device memory.- Returns:
- created image or null if failed
-
make
@SharedPtr public static @Nullable @SharedPtr VulkanImage make(@NonNull Context context, @NonNull VulkanImageDesc desc) -
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
-