Show Mandelbrot Set on display

Hello,
I’m trying to develop a Mandelbrot Set with CUDA.
The kernel works just fine but I’m searching for the best way to show the calculated Mandelbrot Set on my monitor.

Which ways are possible for this? I’ve heard about OpenGL but never programmed with it. So OpenGL sounds very complicated for a newbie like me.

When I calculate the Madelbrot Set on the GPU, the calculated data lays of course in the global memory of the GPU. Is it possible to use this data for displaying immediatly without copying it back to the CPU?

Or are there any other possibilities to show the Mandelbrot Set on the display?

Thank you very much in advance. :)

Edit: I just saw that I may posted this thread in the wrong category. Maybe a host can move it to “CUDA Programming and Development”. Thanks :)

there are so many SDK samples that use openGL or DirectX to display the result of image processing and there is even a Mandelbrot sample. What else would you need?

I usually start my own pet projects by modifying one of the SDK samples, it’s the fastest way (simply copy the folder, rename files, adjust Visual Studio .proj file and get going)

To provide some clues we also need more information: Are you on Windows, Linux, Mac OS X ? What CUDA SDK version are you working with? I am just about to simplify the simpleD3D9Texture sample to render a single texture, optionally full screen - and I want to also use nVidia 3D Vision with it (rendering Buddhabrot fractals in 3D). But that’s Windows-only.

What you generally want to do is render to a texture buffer, and finally render the texture to the screen. Concerning texture interoperability between DirectX or OpenGL and CUDA there have been some pretty significant API changes from the SDK version 2 to SDK version 3.

I’m using Windows and SDK 3.1.

boxFilter, imageDenoising, SobelFilter might all be good samples to start with. SobelFilter operates on a grayscale image, the others are in color. They all process a source image and render the result on screen. But instead of processing it you could simply replace it with your fractal. It is easy enough to remove loading of the source image and to initialize an empty texture of your preferred dimensions instead.

The simpleD3D9Texture and simpleD3D10Texture samples create DirectX textures and fill them with data using CUDA. This is a good start for going the DirectX route. You might want to kick out the Cube and Volume textures from this sample, as your data is plain 2D.

You can also get rid of the auto testing code (renderCheck) from the SDK samples, it is merely for validating the result against some reference image.

Here’s my current pet project, also Mandelbrot (z^2+c) based: http://forums.nvidia.com/index.php?showtopic=175311

Christian