Class CUDA_TEXTURE_DESC

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class CUDA_TEXTURE_DESC
    extends Struct
    implements NativeResource
    Texture descriptor.

    Member documentation

    • addressMode[3] – Address modes
    • filterMode – Filter mode
    • flags – Flags
    • maxAnisotropy – Maximum anisotropy ratio
    • mipmapFilterMode – Mipmap filter mode
    • mipmapLevelBias – Mipmap level bias
    • minMipmapLevelClamp – Mipmap minimum level clamp
    • maxMipmapLevelClamp – Mipmap maximum level clamp
    • borderColor[4] – Border Color

    Layout

    
     struct CUDA_TEXTURE_DESC {
         CUaddress_mode addressMode[3];
         CUfilter_mode filterMode;
         unsigned int flags;
         unsigned int maxAnisotropy;
         CUfilter_mode mipmapFilterMode;
         float mipmapLevelBias;
         float minMipmapLevelClamp;
         float maxMipmapLevelClamp;
         float borderColor[4];
         int reserved[12];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ADDRESSMODE, FILTERMODE, FLAGS, MAXANISOTROPY, MIPMAPFILTERMODE, MIPMAPLEVELBIAS, MINMIPMAPLEVELCLAMP, MAXMIPMAPLEVELCLAMP, BORDERCOLOR, RESERVED

        The struct member offsets.
    • Constructor Detail

      • CUDA_TEXTURE_DESC

        public CUDA_TEXTURE_DESC​(java.nio.ByteBuffer container)
        Creates a CUDA_TEXTURE_DESC instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • addressMode

        public java.nio.IntBuffer addressMode()
        Returns a IntBuffer view of the addressMode field.
      • addressMode

        public int addressMode​(int index)
        Returns the value at the specified index of the addressMode field.
      • filterMode

        public int filterMode()
        Returns the value of the filterMode field.
      • flags

        public int flags()
        Returns the value of the flags field.
      • maxAnisotropy

        public int maxAnisotropy()
        Returns the value of the maxAnisotropy field.
      • mipmapFilterMode

        public int mipmapFilterMode()
        Returns the value of the mipmapFilterMode field.
      • mipmapLevelBias

        public float mipmapLevelBias()
        Returns the value of the mipmapLevelBias field.
      • minMipmapLevelClamp

        public float minMipmapLevelClamp()
        Returns the value of the minMipmapLevelClamp field.
      • maxMipmapLevelClamp

        public float maxMipmapLevelClamp()
        Returns the value of the maxMipmapLevelClamp field.
      • borderColor

        public java.nio.FloatBuffer borderColor()
        Returns a FloatBuffer view of the borderColor field.
      • borderColor

        public float borderColor​(int index)
        Returns the value at the specified index of the borderColor field.
      • reserved

        public java.nio.IntBuffer reserved()
        Returns a IntBuffer view of the reserved field.
      • reserved

        public int reserved​(int index)
        Returns the value at the specified index of the reserved field.
      • addressMode

        public CUDA_TEXTURE_DESC addressMode​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the addressMode field.
      • addressMode

        public CUDA_TEXTURE_DESC addressMode​(int index,
                                             int value)
        Sets the specified value at the specified index of the addressMode field.
      • filterMode

        public CUDA_TEXTURE_DESC filterMode​(int value)
        Sets the specified value to the filterMode field.
      • flags

        public CUDA_TEXTURE_DESC flags​(int value)
        Sets the specified value to the flags field.
      • maxAnisotropy

        public CUDA_TEXTURE_DESC maxAnisotropy​(int value)
        Sets the specified value to the maxAnisotropy field.
      • mipmapFilterMode

        public CUDA_TEXTURE_DESC mipmapFilterMode​(int value)
        Sets the specified value to the mipmapFilterMode field.
      • mipmapLevelBias

        public CUDA_TEXTURE_DESC mipmapLevelBias​(float value)
        Sets the specified value to the mipmapLevelBias field.
      • minMipmapLevelClamp

        public CUDA_TEXTURE_DESC minMipmapLevelClamp​(float value)
        Sets the specified value to the minMipmapLevelClamp field.
      • maxMipmapLevelClamp

        public CUDA_TEXTURE_DESC maxMipmapLevelClamp​(float value)
        Sets the specified value to the maxMipmapLevelClamp field.
      • borderColor

        public CUDA_TEXTURE_DESC borderColor​(java.nio.FloatBuffer value)
        Copies the specified FloatBuffer to the borderColor field.
      • borderColor

        public CUDA_TEXTURE_DESC borderColor​(int index,
                                             float value)
        Sets the specified value at the specified index of the borderColor field.
      • reserved

        public CUDA_TEXTURE_DESC reserved​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the reserved field.
      • reserved

        public CUDA_TEXTURE_DESC reserved​(int index,
                                          int value)
        Sets the specified value at the specified index of the reserved field.
      • set

        public CUDA_TEXTURE_DESC set​(java.nio.IntBuffer addressMode,
                                     int filterMode,
                                     int flags,
                                     int maxAnisotropy,
                                     int mipmapFilterMode,
                                     float mipmapLevelBias,
                                     float minMipmapLevelClamp,
                                     float maxMipmapLevelClamp,
                                     java.nio.FloatBuffer borderColor,
                                     java.nio.IntBuffer reserved)
        Initializes this struct with the specified values.
      • malloc

        public static CUDA_TEXTURE_DESC malloc()
        Returns a new CUDA_TEXTURE_DESC instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static CUDA_TEXTURE_DESC calloc()
        Returns a new CUDA_TEXTURE_DESC instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static CUDA_TEXTURE_DESC create​(long address)
        Returns a new CUDA_TEXTURE_DESC instance for the specified memory address.
      • createSafe

        @Nullable
        public static CUDA_TEXTURE_DESC createSafe​(long address)
        Like create, but returns null if address is NULL.
      • createSafe

        @Nullable
        public static CUDA_TEXTURE_DESC.Buffer createSafe​(long address,
                                                          int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static CUDA_TEXTURE_DESC mallocStack()
        Returns a new CUDA_TEXTURE_DESC instance allocated on the thread-local MemoryStack.
      • callocStack

        public static CUDA_TEXTURE_DESC callocStack()
        Returns a new CUDA_TEXTURE_DESC instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static CUDA_TEXTURE_DESC mallocStack​(MemoryStack stack)
        Returns a new CUDA_TEXTURE_DESC instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static CUDA_TEXTURE_DESC callocStack​(MemoryStack stack)
        Returns a new CUDA_TEXTURE_DESC instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • naddressMode

        public static java.nio.IntBuffer naddressMode​(long struct)
        Unsafe version of addressMode().
      • naddressMode

        public static int naddressMode​(long struct,
                                       int index)
        Unsafe version of addressMode.
      • nfilterMode

        public static int nfilterMode​(long struct)
        Unsafe version of filterMode().
      • nflags

        public static int nflags​(long struct)
        Unsafe version of flags().
      • nmaxAnisotropy

        public static int nmaxAnisotropy​(long struct)
        Unsafe version of maxAnisotropy().
      • nmipmapFilterMode

        public static int nmipmapFilterMode​(long struct)
        Unsafe version of mipmapFilterMode().
      • nmipmapLevelBias

        public static float nmipmapLevelBias​(long struct)
        Unsafe version of mipmapLevelBias().
      • nminMipmapLevelClamp

        public static float nminMipmapLevelClamp​(long struct)
        Unsafe version of minMipmapLevelClamp().
      • nmaxMipmapLevelClamp

        public static float nmaxMipmapLevelClamp​(long struct)
        Unsafe version of maxMipmapLevelClamp().
      • nborderColor

        public static java.nio.FloatBuffer nborderColor​(long struct)
        Unsafe version of borderColor().
      • nborderColor

        public static float nborderColor​(long struct,
                                         int index)
        Unsafe version of borderColor.
      • nreserved

        public static java.nio.IntBuffer nreserved​(long struct)
        Unsafe version of reserved().
      • nreserved

        public static int nreserved​(long struct,
                                    int index)
        Unsafe version of reserved.
      • naddressMode

        public static void naddressMode​(long struct,
                                        java.nio.IntBuffer value)
        Unsafe version of addressMode.
      • naddressMode

        public static void naddressMode​(long struct,
                                        int index,
                                        int value)
        Unsafe version of addressMode.
      • nfilterMode

        public static void nfilterMode​(long struct,
                                       int value)
        Unsafe version of filterMode.
      • nflags

        public static void nflags​(long struct,
                                  int value)
        Unsafe version of flags.
      • nmaxAnisotropy

        public static void nmaxAnisotropy​(long struct,
                                          int value)
        Unsafe version of maxAnisotropy.
      • nmipmapFilterMode

        public static void nmipmapFilterMode​(long struct,
                                             int value)
        Unsafe version of mipmapFilterMode.
      • nmipmapLevelBias

        public static void nmipmapLevelBias​(long struct,
                                            float value)
        Unsafe version of mipmapLevelBias.
      • nminMipmapLevelClamp

        public static void nminMipmapLevelClamp​(long struct,
                                                float value)
        Unsafe version of minMipmapLevelClamp.
      • nmaxMipmapLevelClamp

        public static void nmaxMipmapLevelClamp​(long struct,
                                                float value)
        Unsafe version of maxMipmapLevelClamp.
      • nborderColor

        public static void nborderColor​(long struct,
                                        java.nio.FloatBuffer value)
        Unsafe version of borderColor.
      • nborderColor

        public static void nborderColor​(long struct,
                                        int index,
                                        float value)
        Unsafe version of borderColor.
      • nreserved

        public static void nreserved​(long struct,
                                     java.nio.IntBuffer value)
        Unsafe version of reserved.
      • nreserved

        public static void nreserved​(long struct,
                                     int index,
                                     int value)
        Unsafe version of reserved.