Class Shader

java.lang.Object
com.raylib.Shader

public class Shader extends Object
Shader
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct with auto memory allocator and fields initialized to zero.
    Shader(int id, IntBuffer locs)
    Construct with auto memory allocator and fields initialized as specified
    Shader(MemorySegment memorySegment)
    Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    Construct with your owm memory allocator and fields not initialized
    Shader(SegmentAllocator arena, int id, IntBuffer locs)
    Construct with your own memory allocator and fields initialized as specified
  • Method Summary

    Modifier and Type
    Method
    Description
    static Shader
    allocateArray(long elementCount)
    Allocate an array of Shader
    static Shader
    allocateArray(long elementCount, SegmentAllocator allocator)
    Allocate an array of Shader
    boolean
    Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
    getArrayElement(int index)
     
    int
    Shader program id
    Shader locations array (RL_MAX_SHADER_LOCATIONS)
    int
     
    int
    id()
    Shader program id
    id(int value)
    Shader program id
    Shader locations array (RL_MAX_SHADER_LOCATIONS)
    locs(IntBuffer value)
    Shader locations array (RL_MAX_SHADER_LOCATIONS)
    void
    setId(int value)
    Shader program id
    void
    Shader locations array (RL_MAX_SHADER_LOCATIONS)

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • memorySegment

      public final MemorySegment memorySegment
      The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Details

    • Shader

      public Shader()
      Construct with auto memory allocator and fields initialized to zero.
    • Shader

      public Shader(SegmentAllocator arena)
      Construct with your owm memory allocator and fields not initialized
    • Shader

      public Shader(MemorySegment memorySegment)
      Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    • Shader

      public Shader(int id, IntBuffer locs)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      id - Shader program id
      locs - Shader locations array (RL_MAX_SHADER_LOCATIONS)
    • Shader

      public Shader(SegmentAllocator arena, int id, IntBuffer locs)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      id - Shader program id
      locs - Shader locations array (RL_MAX_SHADER_LOCATIONS)
  • Method Details

    • equals

      public boolean equals(Object o)
      Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getArrayElement

      public Shader getArrayElement(int index)
    • allocateArray

      public static Shader allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of Shader
    • allocateArray

      public static Shader allocateArray(long elementCount)
      Allocate an array of Shader
    • getId

      public int getId()
      Shader program id
    • setId

      public void setId(int value)
      Shader program id
    • id

      public int id()
      Shader program id
    • id

      public Shader id(int value)
      Shader program id
    • getLocs

      public IntBuffer getLocs()
      Shader locations array (RL_MAX_SHADER_LOCATIONS)
    • setLocs

      public void setLocs(IntBuffer value)
      Shader locations array (RL_MAX_SHADER_LOCATIONS)
    • locs

      public IntBuffer locs()
      Shader locations array (RL_MAX_SHADER_LOCATIONS)
    • locs

      public Shader locs(IntBuffer value)
      Shader locations array (RL_MAX_SHADER_LOCATIONS)