[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: QT + SDL
From: Carsten Pfeiffer <carpdjih () cetus ! zrz ! tu-berlin ! de>
Date: 2001-10-27 0:29:15
[Download RAW message or body]
On Samstag, 27. Oktober 2001 00:30 Josef Spillner wrote:
> Yes.
> You either create an SDL surface and map it on your widget, or you define a
> widget background and set this as the source for the SDL surface.
> I only succeeded the first way, similar to:
>
> SDL_Surface *screen;
> screen = SDL_SetVideoMode(200, 200, 24, SDL_SWSURFACE | SDL_ANYFORMAT);
> ...
> QImage *bgimage;
> bgimage = new QImage((uchar*)screen->pixels, 200, 200, /*24*/32, NULL, 256,
> QImage::LittleEndian);
> ...
> QPixmap map;
> map.convertFromImage(*x_image);
>
> You might want to optimize this (using bitblt etc).
> There is no ready-to-go SDL widget AFAIK.
Converting pixmaps to images is slow -- can't you simply embed the SDL window
into a QWidget? Or doesn't QXEmbed work?
Cheers
Carsten Pfeiffer
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic