• Advertisement
Sign in to follow this  

DirectDraw still the fastest for direct framebuffer access?

This topic is 2652 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Five years ago, if I wanted to write directly to the frame buffer on a Windows machine, DirectDraw was fastest choice. With DX10 and Direct2D, is that still true today?

Also, will DirectDraw always work? What I mean is five years from now could graphics card manufacturers stop writing drivers for it or something like that?

Share this post


Link to post
Share on other sites
Advertisement
Doesn't make too much of a difference what you use, as you will be limited by the PCIe bus to the graphics card. It's usually the fastest to write to system memory, and then have the driver send the image to the GPU. If you want to write directly, D3D9 is probably the easiest way, as you can create a device with a lockable back-buffer.

Share this post


Link to post
Share on other sites
This is one of those "Technically True" answers but technically, if you want the fastest access to the framebuffer, a pixel shader is where it's at.

That or CUDA and other such things.

I'm not tryin to be a smart aleck with this, they could potentially be good avenues to pursue depending on what you are trying to do.

Some people have done raytracers in pixel shaders for instance.

If your code runs on the video card, it has the fastest access to the video memory.

Share this post


Link to post
Share on other sites
Thanks, and thanks.

If the PCIe bus is the bottleneck, then I guess it's true it wouldn't matter much whether I use glDrawPixels or DirectDraw or DirectX Graphics.

Pixel shaders are an interesting suggestion. I'm testing out some software renderer ideas.

Share this post


Link to post
Share on other sites
I don't think there has been hardware support for DirectDraw in some time now. Can anyone correct me if I'm mistaken?

Share this post


Link to post
Share on other sites
Quote:
Original post by Flimflam
I don't think there has been hardware support for DirectDraw in some time now. Can anyone correct me if I'm mistaken?

No, I think you're right. I'd also guess though that DD can potentially take some shortcuts that more general-purpose stuff like GDI can't. I did an interesting test last year between DirectDraw, GDI, GDI+ and Direct3D for writing the end result of a software renderer to screen, and on XP DirectDraw was the fastest by quite a margin. This was non-exclusive DirectDraw using 32-bit surfaces too. I haven't yet repeated it on Windows 7 (I never got to run it on Vista), and haven't even looked at Direct2D.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement