Package icyllis.arc3d.engine
Class BackendImage
java.lang.Object
icyllis.arc3d.engine.BackendImage
- Direct Known Subclasses:
GLBackendImage
,VulkanBackendImage
Descriptor of 3D API image/texture that can be shared between
recording contexts, OpenGL shared contexts and cross-API usage,
including its dimension, image view type, and memory allocation.
A BackendImage instance is initialized once, and may be shared.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
BackendImage
(ImageDesc desc, ImageMutableState mutableState) -
Method Summary
Modifier and TypeMethodDescriptionfinal int
abstract int
abstract BackendFormat
Get the BackendFormat for this image/texture.final int
getDepth()
final ImageDesc
getDesc()
Get the backend info for this image/texture.final int
final int
final int
final ImageMutableState
Get the backend mutable state for this image/texture.final int
getWidth()
void
Call this to indicate that the texture parameters have been modified in the GL context externally to Context.abstract boolean
final boolean
abstract boolean
Returns true if we are working with protected content.abstract boolean
isSameImage
(BackendImage image) Returns true if both images are valid and refer to the same API image handle.void
setVkImageLayout
(int layout) Anytime the client changes the VkImageLayout of the VkImage captured by thisBackendImage
, they must call this function to notify pipeline of the changed layout.void
setVkQueueFamilyIndex
(int queueFamilyIndex) Anytime the client changes the QueueFamilyIndex of the VkImage captured by thisBackendImage
, they must call this function to notify pipeline of the changed layout.
-
Field Details
-
mDesc
-
mMutableState
-
-
Constructor Details
-
BackendImage
-
-
Method Details
-
getBackend
public abstract int getBackend()- Returns:
- see
Engine.BackendApi
-
getWidth
public final int getWidth()- Returns:
- width in pixels
-
getHeight
public final int getHeight()- Returns:
- height in pixels
-
getDepth
public final int getDepth() -
getArraySize
public final int getArraySize() -
getImageType
public final int getImageType()- Returns:
- see
Engine.ImageType
-
isExternal
public abstract boolean isExternal()- Returns:
- external texture
-
isMipmapped
public final boolean isMipmapped()- Returns:
- whether the image has mip levels allocated or not
-
getMipLevelCount
public final int getMipLevelCount() -
getDesc
Get the backend info for this image/texture. -
getMutableState
Get the backend mutable state for this image/texture. -
glTextureParametersModified
public void glTextureParametersModified()Call this to indicate that the texture parameters have been modified in the GL context externally to Context.Tells client that these parameters of the texture are changed out of client control (for example, you called glTexParameteri without using
GLDevice
). The local states will be forced to reset to a known state when next use. -
setVkImageLayout
public void setVkImageLayout(int layout) Anytime the client changes the VkImageLayout of the VkImage captured by thisBackendImage
, they must call this function to notify pipeline of the changed layout. -
setVkQueueFamilyIndex
public void setVkQueueFamilyIndex(int queueFamilyIndex) Anytime the client changes the QueueFamilyIndex of the VkImage captured by thisBackendImage
, they must call this function to notify pipeline of the changed layout. -
getBackendFormat
Get the BackendFormat for this image/texture. -
isProtected
public abstract boolean isProtected()Returns true if we are working with protected content. -
isSameImage
Returns true if both images are valid and refer to the same API image handle.
-