Hi,
Is it possible to get multiple SDL surface, for a single
process...??
I tried to get it, using pthreads, but it failed... Then i did using
fork(), so I think, I can get as many screen as I want, but for a
process, only one screen I am getting..?? Is there any alternative way
for getting many screens in a single process.?
Please guide me !!
--
Lohitha R
If you want multiple windows/screen surfaces, then you have to use SDL 1.3.
It has a different API to handle this. If you just want multiple surfaces,
then use SDL_CreateRGBSurface or SDL_LoadBMP, etc.
Jonny D
Hello,
as somebody else tried to explain. With SDL 1.2 you're currently using
this is not possible. What you can do here is to make a one bigger on-
screen surface that will fit 4 off-screen surface that you can blit to
this one. However I guess all of those are just software surfaces and
it's going to be slow.
With SDL 1.3 that you need to compile yourself from HG repository you
could be able to open 4 windows for 4 video playbacks. Or you can use
one bigger video surface in 1 window again and do the playback using
OpenGL textures.
Pavel
---
Pavel Kanzelsberger
http://www.kanzelsberger.com
E-Mail: pavel*******
Jabber: kanzelsberger*******, ICQ: 20990633
_______________________________________________
SDL mailing list
SDL*******
Hi, Lohitha,
There seems to be some confusion about your question, so I'm going to take a
crack at this.
What you are saying is that you are using one Gtk window, and one SDL
instance with multiple SDL_surface's, each one displays a video.
It looks like http://sdl.beuc.net/sdl.wiki/FAQ_GUI has some answers as to
how to blit a SDL_surface onto a GtkDrawable widget. This is probably your
best bet, and it won't require you to use SDL_SetVideoMode() because SDL
isn't running the window, Gtk is.
You should be able to use a GtkDrawable as an array ( GtkDrawable
*videos[rows][cols]; ) and associate your buttons the same way.
I hope that helps,
-Alex
Oh, I just got the update that you may just use one big SDL screen divided
up - I did this search on libsdl's website:
http://www.libsdl.org/libraries.php?order=name&category=[..]
Maybe something from there helps?
_______________________________________________
SDL mailing list
SDL*******
It would be as fast as SDL can blit to a GtkDrawable widget. I don't see
why it wouldn't be real-time. I haven't tried SDL -> GtkDrawable for video,
so I can't give a definite answer, but I suppose it is more hardware
dependent than it is SDL dependent.
If it isn't absolute real-time, you could probably fake the realtime by
dropping frames from the video playback (which is how most modern video
players work, anyway).
Take care,
-Alex
Try SDL_CreateRGBSurfaceFrom():
http://www.libsdl.org/cgi/docwiki.cgi/SDL_CreateRGBSurfaceFrom
For Windows GDI for example, you could use CreateDIBSection() and
SDL_CreateRGBSurfaceFrom(), passing the same pointer to both, then
handle drawing to the window in WM_PAINT using GDI (Use
InvalidateRect() instead of SDL_UpdateRect()).
http://msdn.microsoft.com/en-us/library/dd183494 (v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/dd145002 (v=VS.85).aspx
It's probably a lot easier in GTK, but I haven't tried it.