Class GLBackendImage

java.lang.Object
icyllis.arc3d.engine.BackendImage
icyllis.arc3d.opengl.GLBackendImage

public final class GLBackendImage extends BackendImage
When importing external memory, memoryHandle is POSIX file descriptor or Win32 NT handle. memoryObject is OpenGL memory object. If it is an NT handle, it must be released manually by the memory exporter (e.g. Vulkan).
  • Field Details

    • handle

      public int handle
      GLuint - image name
    • levels

      public int levels
      GLsizei - number of mip levels
    • memoryObject

      public int memoryObject
      GLuint - memory
    • memoryHandle

      public long memoryHandle
      
       union {
           int fd; // file descriptor
           HANDLE handle; // win32 handle
       };
       
  • Constructor Details

    • GLBackendImage

      public GLBackendImage(int width, int height, GLImageDesc desc)
  • Method Details

    • getBackend

      public int getBackend()
      Specified by:
      getBackend in class BackendImage
      Returns:
      see Engine.BackendApi
    • isExternal

      public boolean isExternal()
      Specified by:
      isExternal in class BackendImage
      Returns:
      external texture
    • getGLImageInfo

      public GLImageDesc getGLImageInfo()
    • glTextureParametersModified

      public void glTextureParametersModified()
      Description copied from class: BackendImage
      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.

      Overrides:
      glTextureParametersModified in class BackendImage
    • getBackendFormat

      @Nonnull public BackendFormat getBackendFormat()
      Description copied from class: BackendImage
      Get the BackendFormat for this image/texture.
      Specified by:
      getBackendFormat in class BackendImage
    • isProtected

      public boolean isProtected()
      Description copied from class: BackendImage
      Returns true if we are working with protected content.
      Specified by:
      isProtected in class BackendImage
    • isSameImage

      public boolean isSameImage(BackendImage image)
      Description copied from class: BackendImage
      Returns true if both images are valid and refer to the same API image handle.
      Specified by:
      isSameImage in class BackendImage
    • toString

      public String toString()
      Overrides:
      toString in class Object