0

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.

Meligordman
  • 75
  • 2
  • 7
  • 3
    In OpenGL, you can render to a framebuffer object, then the result is stored in a texture which can be read back. This would not *display* the rendered line, but you still need a OpenGL context which might (depending on your OS) require a window handle. – BDL Dec 18 '18 at 08:22
  • I see. I will check it in more details. Although my current environment is windows (which I suspect requires a window handler), the target system is Linux, which should be ok. Thanks a lot! – Meligordman Dec 19 '18 at 02:47

0 Answers0