VTK-m  2.1
Namespaces | Classes | Functions
vtkm::interop Namespace Reference

VTK-m OpenGL Interoperability. More...

Namespaces

 anari
 
 cuda
 

Classes

class  BufferState
 Manages the state for transferring an ArrayHandle to opengl. More...
 

Functions

template<typename ValueType , class StorageTag , class DeviceAdapterTag >
void TransferToOpenGL (const vtkm::cont::ArrayHandle< ValueType, StorageTag > &handle, BufferState &state, DeviceAdapterTag)
 Manages transferring an ArrayHandle to opengl . More...
 
template<typename ValueType , typename StorageTag >
void TransferToOpenGL (const vtkm::cont::ArrayHandle< ValueType, StorageTag > &handle, BufferState &state)
 Manages transferring an ArrayHandle to opengl . More...
 

Detailed Description

VTK-m OpenGL Interoperability.

vtkm::interop defines the publicly accessible API for interoperability between vtkm and OpenGL.

Function Documentation

◆ TransferToOpenGL() [1/2]

template<typename ValueType , typename StorageTag >
void vtkm::interop::TransferToOpenGL ( const vtkm::cont::ArrayHandle< ValueType, StorageTag > &  handle,
BufferState state 
)

Manages transferring an ArrayHandle to opengl .

TransferToOpenGL manages to transfer the contents of an ArrayHandle to OpenGL as efficiently as possible. Will use the given state to determine what buffer handle to use, and the type to bind the buffer handle too. If the type of buffer hasn't been determined the transfer will use deduceAndSetBufferType to do so. Lastly state also holds on to per backend resources that allow for efficient updating to open gl

This function keeps the buffer as the active buffer of the input type.

This function will throw exceptions if the transfer wasn't possible

◆ TransferToOpenGL() [2/2]

template<typename ValueType , class StorageTag , class DeviceAdapterTag >
void vtkm::interop::TransferToOpenGL ( const vtkm::cont::ArrayHandle< ValueType, StorageTag > &  handle,
BufferState state,
DeviceAdapterTag   
)

Manages transferring an ArrayHandle to opengl .

TransferToOpenGL manages to transfer the contents of an ArrayHandle to OpenGL as efficiently as possible. Will use the given state to determine what buffer handle to use, and the type to bind the buffer handle too. Lastly state also holds on to per backend resources that allow for efficient updating to open gl.

This function keeps the buffer as the active buffer of the input type.