SDL Qtopia Version only support 16 bit mode

Hello,

a short question about the Qtopia version of the SDL: Does this version only
support 16 bit modes? That means the bpp parameter of SDL_SetVideoMode must
be 16?

After I had a look on the repaintRotation3 function in SDL_QWin.cc I think
this must be the case. If I’m right, I think it would be a good idea that
SDL_SetVideoMode of the Qtopia version returns an error if a bitdepth not equal
16 is set.

In my opinion SDL_SetVideoMode of the Qtopia Version should also return an
error if a unsupportet flag is set. How ist this handled on other SDL
versions?–
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte l?cheln! Fotogalerie online mit GMX ohne eigene Homepage!

blachner at gmx.de writes:

Hello,

a short question about the Qtopia version of the SDL: Does this version only
support 16 bit modes? That means the bpp parameter of SDL_SetVideoMode must
be 16?

After I had a look on the repaintRotation3 function in SDL_QWin.cc I think
this must be the case. If I’m right, I think it would be a good idea that
SDL_SetVideoMode of the Qtopia version returns an error if a bitdepth not equal
16 is set.

In my opinion SDL_SetVideoMode of the Qtopia Version should also return an
error if a unsupportet flag is set. How ist this handled on other SDL
versions?

No you can run other modes too. Note however that if you do, SDL will
use 16bpp in the core and it will be slower. It works, but is not
optimal. It’s the same thing that happens in for example X11 when you
ask for 16 bpp and the desktop is using 24 (32) bpp.–
[ Below is a random fortune, which is unrelated to the above message. ]
Brain fried – Core dumped

No you can run other modes too. Note however that if you do, SDL will
use 16bpp in the core and it will be slower. It works, but is not
optimal. It’s the same thing that happens in for example X11 when you
ask for 16 bpp and the desktop is using 24 (32) bpp.

Yes I see, 8 Bit modes are possible. I tested it. But for me it works only
with the inverted direction in landscape mode. More about this problem in a
seperate posting.

But some more questions about bit depth:

In the function QT_SetVideoMode it seems that the image which is blitted to
the direrct painter will be generated with the given bit depth. That means if
I give a depth of 8 in SDL_SetVideoMode the QImage will created wit 8 Bit
depth? Or is this image always created with 16 Bit depth? Hmm. I thougt I have
seen in my debugging session that it is cretead with 8 Bit. Maybe I remember
wrong, than you can forget the rest of this posting.

But, if this is the case and the QImage is constructed with 8 Bit depth, I
think there are problems in some parts of the blit functions:

E.g. SDL_QWin::repaintRotation3:


if(rect == my_image->rect())
{
memcpy(fb, buf, width()*height()*2);
}

As far I can see, this always copies 2 Byte pro pixel (16 Bit). But if the
QImage (buf) is only 8 Bit depth, how should it work? Maybe I missunderstand
there something.–
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte l?cheln! Fotogalerie online mit GMX ohne eigene Homepage!

blachner at gmx.de writes:

But, if this is the case and the QImage is constructed with 8 Bit depth, I
think there are problems in some parts of the blit functions:

It always uses 16 bit. I have tried this - it works with any
bitdepth. SDL sees that the Qtopia backend only supports 16 bit.–
[ Below is a random fortune, which is unrelated to the above message. ]
Courage is your greatest present need.