Class BGFXUniformInfo

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

    public class BGFXUniformInfo
    extends Struct
    implements NativeResource
    Uniform info.

    Member documentation

    • name – uniform name
    • type – uniform type
    • num – number of elements in array


     struct bgfx_uniform_info_t {
         char name[256];
         bgfx_uniform_type_t type;
         uint16_t num;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • NAME, TYPE, NUM

        The struct member offsets.
    • Constructor Detail

      • BGFXUniformInfo

        public BGFXUniformInfo​(java.nio.ByteBuffer container)
        Creates a BGFXUniformInfo 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
      • name

        public java.nio.ByteBuffer name()
        Returns a ByteBuffer view of the name field.
      • nameString

        public java.lang.String nameString()
        Decodes the null-terminated string stored in the name field.
      • type

        public int type()
        Returns the value of the type field.
      • num

        public short num()
        Returns the value of the num field.
      • name

        public BGFXUniformInfo name​(java.nio.ByteBuffer value)
        Copies the specified encoded string to the name field.
      • type

        public BGFXUniformInfo type​(int value)
        Sets the specified value to the type field.
      • num

        public BGFXUniformInfo num​(short value)
        Sets the specified value to the num field.
      • set

        public BGFXUniformInfo set​(java.nio.ByteBuffer name,
                                   int type,
                                   short num)
        Initializes this struct with the specified values.
      • set

        public BGFXUniformInfo set​(BGFXUniformInfo src)
        Copies the specified struct data to this struct.
        src - the source struct
        this struct
      • createSafe

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

        public static BGFXUniformInfo.Buffer create​(long address,
                                                    int capacity)
        Create a BGFXUniformInfo.Buffer instance at the specified memory.
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        public static BGFXUniformInfo.Buffer createSafe​(long address,
                                                        int capacity)
        Like create, but returns null if address is NULL.
      • nname

        public static java.nio.ByteBuffer nname​(long struct)
        Unsafe version of name().
      • nnameString

        public static java.lang.String nnameString​(long struct)
        Unsafe version of nameString().
      • ntype

        public static int ntype​(long struct)
        Unsafe version of type().
      • nnum

        public static short nnum​(long struct)
        Unsafe version of num().
      • nname

        public static void nname​(long struct,
                                 java.nio.ByteBuffer value)
        Unsafe version of name.
      • ntype

        public static void ntype​(long struct,
                                 int value)
        Unsafe version of type.
      • nnum

        public static void nnum​(long struct,
                                short value)
        Unsafe version of num.