Class GlUtil.Attribute

    • Field Detail

      • name

        public final String name
        The name of the attribute in the GLSL sources.
    • Constructor Detail

      • Attribute

        public Attribute​(String name,
                         int index,
                         int location)
    • Method Detail

      • setBuffer

        public void setBuffer​(float[] buffer,
                              int size)
        Configures bind() to attach vertices in buffer (each of size size elements) to this GlUtil.Attribute.
        Parameters:
        buffer - Buffer to bind to this attribute.
        size - Number of elements per vertex.
      • bind

        public void bind()
        Sets the vertex attribute to whatever was attached via setBuffer(float[], int).

        Should be called before each drawing call.