SDL_HWSURFACE not returning a hardware surface?

I’ve been playing around with SDL some for the past few days, and finally
got around to checking what SDL was giving me when I asked for a new screen
on the Win2K box I was working on/

To my surprise, SDL_SetVideoMode(320,240,32,SDL_HWSURFACE|SDL_DOUBLEBUF);
gives me neither HWSURFACE nor double buffering. Similarly, it seems to
ignore SDL_SWSURFACE, both with and without DOUBLEBUF. This contradicts
SDL_GetVideoInfo(), which says I should be able to get at least a Hardware
Sufrace, SDL_VideoModeOK, which says I should be able to do it at 32bpp,
and SDL_ListModes, which appears to say that I should be able to get it at
any(?) resolution at 32bpp.

This is repeatable on my Win98 box, with a different graphics card. Both
Win2k and Win98 are using the directx driver.

Incidentally, what kind of surface is a surface that’s neither hardware nor
software?

— Christopher Subich wrote:

I’ve been playing around with SDL some for the past
few days, and finally
got around to checking what SDL was giving me when I
asked for a new screen
on the Win2K box I was working on/

To my surprise,

SDL_SetVideoMode(320,240,32,SDL_HWSURFACE|SDL_DOUBLEBUF);

gives me neither HWSURFACE nor double buffering.
Similarly, it seems to
ignore SDL_SWSURFACE, both with and without
DOUBLEBUF. This contradicts
SDL_GetVideoInfo(), which says I should be able to
get at least a Hardware
Sufrace, SDL_VideoModeOK, which says I should be
able to do it at 32bpp,
and SDL_ListModes, which appears to say that I
should be able to get it at
any(?) resolution at 32bpp.

This is repeatable on my Win98 box, with a different
graphics card. Both
Win2k and Win98 are using the directx driver.

Currently all versions of SDL (with the possible
exception of SDL on Amiga) do not support hardware
surfaces in a window. Basically the problem is that
there is no way to prevent the SDL program to draw on
top of windows that might be on top of the SDL window
if the program has access to a hardware surface.

Incidentally, what kind of surface is a surface
that’s neither hardware nor
software?

If you look carefully at the definithion of
SDL_SWSURFACE, it’s defined as the bitmask 0x00000000.
, or in plain English, it has no bits. Therefore it
is defined purely as the lack of the bit indicating a
SDL_HWSURFACE. Understood?

Best Regards,

-Loren__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better

— Loren Osborn <@Loren_Osborn> wrote:

If you look carefully at the definithion of
^^^^^^^^^^^^

Greight Zpehl Czehker? … Hmmm… :(__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better

At 02:39 PM 7/30/02 -0700, you wrote:

Best Regards,

-Loren

Thank you. I didn’t notice that point in any of the documentation I read,
and apparently didn’t try hardware mode in conjunction with fullscreen.

One more question, until my next – is surface->format->BitsPerPixel
supposed to return a ‘1’ on a surface created with CreateRGBSurface?

— Christopher Subich wrote:

At 02:39 PM 7/30/02 -0700, you wrote:

Best Regards,

-Loren

Thank you. I didn’t notice that point in any of the
documentation I read,
and apparently didn’t try hardware mode in
conjunction with fullscreen.

One more question, until my next – is
surface->format->BitsPerPixel
supposed to return a ‘1’ on a surface created with
CreateRGBSurface?

Umm… first off surface->format->BitsPerPixel is a
data member, not a function, so technically it doesn’t
return anything: It just has a value that you can
access…

surface->format->BitsPerPixel to my knowledge is
supposed to be exactly that Bits Per Pixel… To my
knowledge SDL doesn’t support less than 8 bits per
pixel (although I could be mistaken, but I really
doubt it supports monochrome). The only time when
surface->format->BitsPerPixel could be 1 is if you’re
dealing with a (monochrome) bitmap image, which I
don’t think SDL supports…

As far as trying to distinguish between the video
surface and another surface, you could compare the
pointer to that of the Video surface (as there is
currently only support for one)…

Does this help?

-Loren__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better