How to rasterize a line in memory without displaying rendered image?

64 Views Asked by At

I am trying to use GPGPU for some (scientific) calculations.

Essentially, I need to rasterize (with antialiasing) a (bountiful of) line(s) cutting a grid, and save this data in a sparse format (that will later be handled by CUDA or alike). I believe Xiaolin Wu's line would do the work, for example (https://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm).

My question is: can I use OpenGL/OpenVG/NV_path_rendering library to do it for me (fast and efficiently) without producing a display output, but only storing float values on a memory array of given resolution (width-height) so I can later process it?

I only have little experience with OpenGL and it always had a window or something that I really don't want in this case.

0

There are 0 best solutions below