[SDL] Re: SDL Qtopia Version only support 16 bit mode

blachner at gmx.de blachner at gmx.de
Thu May 15 00:28:03 PDT 2003


> 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!





More information about the SDL mailing list