java.lang.Object
physx.NativeObject
physx.common.PxCudaContextManagerDesc
Descriptor used to create a PxCudaContextManager
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxCudaContextManagerDescarrayGet(long baseAddress, int index) static PxCudaContextManagerDesccreateAt(long address) static <T> PxCudaContextManagerDesccreateAt(T allocator, NativeObject.Allocator<T> allocate) voiddestroy()* 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.getCtx()* The CUDA context to manage * * If left NULL, the PxCudaContextManager will create a new context.* D3D device pointer or OpenGl context handle * * Only applicable when ctx is NULL, thus forcing a new context to be * created.voidsetAppGUID(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.void* The CUDA context to manage * * If left NULL, the PxCudaContextManager will create a new context.voidsetGraphicsDevice(NativeObject value) * D3D device pointer or OpenGl context handle * * Only applicable when ctx is NULL, thus forcing a new context to be * created.static PxCudaContextManagerDescwrapPointer(long address) Methods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
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
-
arrayGet
-
createAt
- 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
* 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
* 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
* 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
* 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
* 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
* 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.
-