Class Material

java.lang.Object
com.raylib.Material

public class Material extends Object
Material, includes shader and maps
  • Field Details

    • memorySegment

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

    • Material

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

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

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

      public Material(Shader shader, MaterialMap maps, float[] params)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      shader - Material shader
      maps - Material maps array (MAX_MATERIAL_MAPS)
      params - Material generic parameters (if required)
    • Material

      public Material(SegmentAllocator arena, Shader shader, MaterialMap maps, float[] params)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      shader - Material shader
      maps - Material maps array (MAX_MATERIAL_MAPS)
      params - Material generic parameters (if required)
  • 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 Material getArrayElement(int index)
    • allocateArray

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

      public static Material allocateArray(long elementCount)
      Allocate an array of Material
    • getShader

      public Shader getShader()
      Material shader
    • setShader

      public void setShader(Shader value)
      Material shader
    • shader

      public Shader shader()
      Material shader
    • shader

      public Material shader(Shader value)
      Material shader
    • getMaps

      public MaterialMap getMaps()
      Material maps array (MAX_MATERIAL_MAPS)
    • setMaps

      public void setMaps(MaterialMap value)
      Material maps array (MAX_MATERIAL_MAPS)
    • maps

      public MaterialMap maps()
      Material maps array (MAX_MATERIAL_MAPS)
    • maps

      public Material maps(MaterialMap value)
      Material maps array (MAX_MATERIAL_MAPS)
    • getParams

      public float[] getParams()
      Material generic parameters (if required)
    • setParams

      public void setParams(float[] value)
      Material generic parameters (if required)
    • params

      public float[] params()
      Material generic parameters (if required)
    • params

      public Material params(float[] value)
      Material generic parameters (if required)