[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QT + SDL
From:       Josef Spillner <dr_maux () maux ! de>
Date:       2001-10-26 22:30:00
[Download RAW message or body]

On Friday 26 October 2001 14:29, Helder Correia wrote:
> Hello, is it possible to have an application run as a normal KDE/QT window,
> a drawing canvas for instance, and with a mouse click or key sequence go
> into a SDL fullscreen mode? I don't know if I'm making myself clear. In
> other words, is there a QT (or KDE) SDL widget? Thanks

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.

Josef

-- 
The MindX Open Source Project: Fighting proprietary games
GGZ now! - The GGZ Gaming Zone: http://ggz.sourceforge.net
ggz.morat.net | ggz.snafu.de | jzaun.com | mindx.sourceforge.net/europeone
 
>> 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