Question

I'm starting an university project, "real time ray tracing". I have to use CUDA, but what can I use for the graphics part?

I wanted to use OpenGL, in particular to draw pixel the glDrawPixels() funcion, however that function is deprecated, and I don't want to use deprecated funcions and also this function doesn't work with newest OpenGL's codes. I searched for a newest function in Opengl but (I think) there isn't one like that.

So I searched for OpenCL, but I haven't figured out if this library can help me.

So, What can I use to implement this project?

Was it helpful?

Solution

A common simple rendering approach in OpenGL that is one level of complexity above glDrawPixels is to draw pixels to a texture, apply the texture to a quad and render from the quad.

This presentation will walk you through the steps, and as a bonus will show you how to use CUDA/OpenGL interop, which will make your ray tracing animation run quicker, and should get you some brownie points at least on your university project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top