Package physx.common

Class PxCudaContextManagerDesc

java.lang.Object
physx.NativeObject
physx.common.PxCudaContextManagerDesc

public class PxCudaContextManagerDesc extends NativeObject
Descriptor used to create a PxCudaContextManager
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxCudaContextManagerDesc

      protected PxCudaContextManagerDesc(long address)
    • PxCudaContextManagerDesc

      public PxCudaContextManagerDesc()
  • Method Details

    • wrapPointer

      public static PxCudaContextManagerDesc wrapPointer(long address)
    • arrayGet

      public static PxCudaContextManagerDesc arrayGet(long baseAddress, int index)
    • createAt

      public static PxCudaContextManagerDesc createAt(long address)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      Returns:
      Stack allocated object of PxCudaContextManagerDesc
    • createAt

      public static <T> PxCudaContextManagerDesc createAt(T allocator, NativeObject.Allocator<T> allocate)
      Type Parameters:
      T - Allocator class, e.g. LWJGL's MemoryStack.
      Parameters:
      allocator - Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.
      allocate - Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.
      Returns:
      Stack allocated object of PxCudaContextManagerDesc
    • destroy

      public void destroy()
    • getCtx

      public CUcontext getCtx()
      * The CUDA context to manage * * If left NULL, the PxCudaContextManager will create a new context. If * graphicsDevice is also not NULL, this new CUDA context will be bound to * that graphics device, enabling the use of CUDA/Graphics interop features. * * If ctx is not NULL, the specified context must be applied to the thread * that is allocating the PxCudaContextManager at creation time (aka, it * cannot be popped). The PxCudaContextManager will take ownership of the * context until the manager is released. All access to the context must be * gated by lock acquisition. * * If the user provides a context for the PxCudaContextManager, the context * _must_ have either been created on the GPU ordinal returned by * PxGetSuggestedCudaDeviceOrdinal() or on your graphics device.
    • setCtx

      public void setCtx(CUcontext value)
      * The CUDA context to manage * * If left NULL, the PxCudaContextManager will create a new context. If * graphicsDevice is also not NULL, this new CUDA context will be bound to * that graphics device, enabling the use of CUDA/Graphics interop features. * * If ctx is not NULL, the specified context must be applied to the thread * that is allocating the PxCudaContextManager at creation time (aka, it * cannot be popped). The PxCudaContextManager will take ownership of the * context until the manager is released. All access to the context must be * gated by lock acquisition. * * If the user provides a context for the PxCudaContextManager, the context * _must_ have either been created on the GPU ordinal returned by * PxGetSuggestedCudaDeviceOrdinal() or on your graphics device.
    • getGraphicsDevice

      public NativeObject getGraphicsDevice()
      * D3D device pointer or OpenGl context handle * * Only applicable when ctx is NULL, thus forcing a new context to be * created. In that case, the created context will be bound to this * graphics device.
    • setGraphicsDevice

      public void setGraphicsDevice(NativeObject value)
      * D3D device pointer or OpenGl context handle * * Only applicable when ctx is NULL, thus forcing a new context to be * created. In that case, the created context will be bound to this * graphics device.
    • getAppGUID

      public String getAppGUID()
      * Application-specific GUID * * If your application employs PhysX modules that use CUDA you need to use a GUID * so that patches for new architectures can be released for your game.You can obtain a GUID for your * application from Nvidia.
    • setAppGUID

      public void setAppGUID(String value)
      * Application-specific GUID * * If your application employs PhysX modules that use CUDA you need to use a GUID * so that patches for new architectures can be released for your game.You can obtain a GUID for your * application from Nvidia.