Wanting to do hardware accelerated stretch blits on Windows - is SDL the right thing to use?

Hi. I have an application that plays video and has some other images
over the video. Currently I am using OpenGL to perform stretch blits
into a window. My problem is that on the Windows platform, OpenGL
acceleration is not always available on some machines that have
crappy (i.e. Intel) video cards. However, it is required that I
support these systems. Therefore, I think I need to use DirectX. It
is my understanding that SDL uses Direct X on Windows.

I am using cross platform technologies (Port Audio, Qt). What I am
considering is using SDL for the hardware accelerated drawing. My
question is whether people on this list consider SDL to be
appropriate for this purpose (doing a 2D stretch blit into a window -
not directly to the screen). I need something that is very reliable.

Thank you.

Brant Sears

Yes, SDL_gfx is what I use for “stretching”. I have a video preview
window, and the source image (from the capture device) is 320x240. But
I make the SDL window sizable, and if the SDL window is not exactly
320x240, then I use SDL_gfx’s rotozoom support.

It works fine, but it is a software stretch, so depending on your window
size, it will eat a good chunk of CPU. At sizes close to 320x240,
rotozoom can keep up with the capture device’s 30fps. But if the
preview window is made quite large (1024x768ish or more) then I’ll start
to drop frames. I can’t recall exactly, but I think I maximized the
window once to 1600x1200 and was getting about 5fps to 10fps.

If you can pre-process your stretches ahead of time, and just render
them at the desired size on demand, you’ll be golden.

Rotozoom has two classes of functions, so if your not rotating, use the
function zoomSurface() which doesn’t do any rotations - it should be
faster.

Doug.