NVIDIA
The set of samples demonstrates how to interact with an external graphics API via Unigine API (ResourceExternalMemory and ResourceFence). Although the samples show interaction with CUDA, you may use them as the basis for integrating the Engine GAPI (Vulkan, DX11, DX12) with other GAPI (OpenGL, DX, CUDA, etc.) that can accept the handle and import a synchronization primitive (such as external semaphore in CUDA).Данный набор сэмплов демонстрирует, как взаимодействовать с внешним графическим API через Unigine API (ResourceExternalMemory и ResourceFence). Хотя примеры показывают взаимодействие с CUDA, вы можете использовать их в качестве основы для интеграции Engine GAPI (Vulkan, DX11, DX12) с другими GAPI (OpenGL, DX, CUDA и т.д.), которые могут принимать дескриптор и импортировать примитив синхронизации (например, внешний семафор в CUDA).
This approach may help in configuring interaction of various API using different GAPI, such as interaction of MediaFoundation using DX11 with the Engine using DX12 or Vulkan.Такой подход может помочь в настройке взаимодействия различных API с использованием разных GAPI, например, взаимодействия MediaFoundation с использованием DX11 с движком с использованием DX12 или Vulkan.
The samples also illustrate how to take the data directly from the video memory without CPU roundtrip and processing it using non-engine graphics API.В примерах также показано, как извлекать данные непосредственно из видеопамяти без циклического переключения ЦП и обрабатывать их с использованием графического API, отличного от движка.
CUDAMeshDynamicCUDAMeshDynamic#
Vertices of a shared dynamic mesh are processed on GPU using CUDA.
To build the sample, use CUDA Toolkit v12.3.
On Linux: after installing the CUDA Toolkit, make sure that the PATH environment variable includes /usr/local/cuda-12.2/bin.
SDK Path: <SDK_INSTALLATION>source\samples\3rdparty\CUDAMeshDynamic
CUDAStructuredBufferWriteCUDAStructuredBufferWrite#
Particles in a shared structured buffer are updated on GPU using CUDA, and rasterized manually using Unigine Material with Compute Shader.
To build the sample, use CUDA Toolkit v12.3.
On Linux: after installing the CUDA Toolkit, make sure that the PATH environment variable includes /usr/local/cuda-12.2/bin.
SDK Path: <SDK_INSTALLATION>source\samples\3rdparty\StructuredBufferWrite
CUDATextureTransferCUDATextureTransfer#
A shared texture is processed with CUDA and copied from video memory to RAM into Unigine Image.
To build the sample, use CUDA Toolkit v12.3.
On Linux: after installing the CUDA Toolkit, make sure that the PATH environment variable includes /usr/local/cuda-12.2/bin.
SDK Path: <SDK_INSTALLATION>source\samples\3rdparty\CUDATextureTransfer
CUDATextureWriteCUDATextureWrite#
A shared texture is processed with CUDA and displayed on the Unigine Object as a texture on a cube.
To build the sample, use CUDA Toolkit v12.3.
On Linux: after installing the CUDA Toolkit, make sure that the PATH environment variable includes /usr/local/cuda-12.2/bin.
SDK Path: <SDK_INSTALLATION>source\samples\3rdparty\CUDATextureWrite