Class ComputeSystem

All Implemented Interfaces:
ConstJoltPhysicsObject, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>

public final class ComputeSystem extends NonCopyable implements RefTarget
A resource on which calculations may be performed.
  • Method Details

    • createComputeQueue

      public ComputeQueueResult createComputeQueue()
      Create a queue for executing compute shaders.
      Returns:
      a new result object
    • createComputeSystem

      public static ComputeSystemResult createComputeSystem()
      Create a compute system that uses a GPU.
      Returns:
      a new result object
    • createComputeSystemCpu

      public static ComputeSystemResult createComputeSystemCpu()
      Create a compute system that doesn't use any GPU.
      Returns:
      a new result object
    • getRtti

      public Rtti getRtti()
      Access the run-time type information of the current compute system. (native function: GetRTTI)
      Returns:
      a new JVM object with the pre-existing native object assigned
    • hairRegisterShaders

      public static void hairRegisterShaders(ComputeSystem system)
      If the argument is a ComputeSystemCPU, register its hair shaders.
      Parameters:
      system - the system to modify (not null)
    • setShaderLoader

      public void setShaderLoader(Loader loader)
      Replace the system's shader loader. (native member: mShaderLoader)
      Parameters:
      loader - the loader to use (not null)
    • getRefCount

      public int getRefCount()
      Count the active references to the native ComputeSystem. The system is unaffected.
      Specified by:
      getRefCount in interface RefTarget
      Returns:
      the count (≥0)
    • setEmbedded

      public void setEmbedded()
      Mark the native ComputeSystem as embedded.
      Specified by:
      setEmbedded in interface RefTarget
    • toRef

      public ComputeSystemRef toRef()
      Create a counted reference to the native ComputeSystem.
      Specified by:
      toRef in interface RefTarget
      Returns:
      a new JVM object with a new native object assigned