Record Class Framebuffer

java.lang.Object
java.lang.Record
lol.trq.helios.fbo.Framebuffer
Record Components:
id - the GL framebuffer
texture - the colour attachment texture
width - width in pixels
height - height in pixels
depthStencil - whether a depth-stencil buffer is attached
ids - the raw ids the backend created

public record Framebuffer(int id, int texture, int width, int height, boolean depthStencil, int[] ids) extends Record
An offscreen framebuffer with an RGBA8 colour texture and an optional depth-stencil buffer, lent out by a FramebufferPool.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Framebuffer(int id, int texture, int width, int height, boolean depthStencil, int[] ids)
    Creates an instance of a Framebuffer record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the depthStencil record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    int
    id()
    Returns the value of the id record component.
    int[]
    ids()
    Returns the value of the ids record component.
    int
    Returns the value of the texture record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the width record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Framebuffer

      public Framebuffer(int id, int texture, int width, int height, boolean depthStencil, int[] ids)
      Creates an instance of a Framebuffer record class.
      Parameters:
      id - the value for the id record component
      texture - the value for the texture record component
      width - the value for the width record component
      height - the value for the height record component
      depthStencil - the value for the depthStencil record component
      ids - the value for the ids record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • texture

      public int texture()
      Returns the value of the texture record component.
      Returns:
      the value of the texture record component
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • depthStencil

      public boolean depthStencil()
      Returns the value of the depthStencil record component.
      Returns:
      the value of the depthStencil record component
    • ids

      public int[] ids()
      Returns the value of the ids record component.
      Returns:
      the value of the ids record component