java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.ComputeSystem
- All Implemented Interfaces:
ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
A resource on which calculations may be performed.
-
Method Summary
Modifier and TypeMethodDescriptionCreate a queue for executing compute shaders.static ComputeSystemResultCreate a compute system that uses a GPU.static ComputeSystemResultCreate a compute system that doesn't use any GPU.intCount the active references to the nativeComputeSystem.getRtti()Access the run-time type information of the current compute system.static voidhairRegisterShaders(ComputeSystem system) If the argument is aComputeSystemCPU, register its hair shaders.voidMark the nativeComputeSystemas embedded.voidsetShaderLoader(Loader loader) Replace the system's shader loader.toRef()Create a counted reference to the nativeComputeSystem.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
createComputeQueue
Create a queue for executing compute shaders.- Returns:
- a new result object
-
createComputeSystem
Create a compute system that uses a GPU.- Returns:
- a new result object
-
createComputeSystemCpu
Create a compute system that doesn't use any GPU.- Returns:
- a new result object
-
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
If the argument is aComputeSystemCPU, register its hair shaders.- Parameters:
system- the system to modify (notnull)
-
setShaderLoader
Replace the system's shader loader. (native member: mShaderLoader)- Parameters:
loader- the loader to use (notnull)
-
getRefCount
public int getRefCount()Count the active references to the nativeComputeSystem. The system is unaffected.- Specified by:
getRefCountin interfaceRefTarget- Returns:
- the count (≥0)
-
setEmbedded
public void setEmbedded()Mark the nativeComputeSystemas embedded.- Specified by:
setEmbeddedin interfaceRefTarget
-
toRef
Create a counted reference to the nativeComputeSystem.
-