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
Modifier and TypeClassDescriptionstatic final record
static final class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionVulkanImage
(Context context, VulkanImageDesc desc, VulkanImageMutableState mutableState, long image, VulkanAllocation memoryAlloc, boolean budgeted, boolean wrapped) -
Method Summary
Modifier and TypeMethodDescriptionstatic VulkanImage.CreatedImageInfo
create
(VulkanDevice device, VulkanImageDesc desc) Create Vulkan image and allocate its device memory.static @SharedPtr VulkanImage
make
(Context context, VulkanImageDesc desc, boolean budgeted) protected void
Subclass should override this method to free GPU resources in the backend API.toString()
long
vkImage()
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, setReleaseCallback
Methods 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:Resource
Subclass should override this method to free GPU resources in the backend API. -
toString
-