Rendering Using GPU

Hi all,
I have a question about using GPU for rendering 3d data.
I found this example in lorensen site, but I have an error. The exception is:

Exception thrown at 0x00007FF8631E96BC (vtkRenderingVolume-8.1.dll) in VTK_Example.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
If there is a handler for this exception, the program may be safely continued.

the error occurs in line 38:
auto mapper =

I do not know if I should for example enable something in building steps to use GPU or VTK will find my GPU (Nvidia 1050Ti) by default.

any suggestion would be helpful,
regards, Rasoul

Looks like you copied incorrectly :

  auto mapper =

do you have any suggestion for using gpu?

So you have the same error with the correct code ?

What is your OS ? GPU ? driver ?

I think you should :
auto mapper = vtkSmartPointer< vtkRenderingVolume>::New();

others, complier don’t define the type of the mapper.