[SDL] Embedding SDL in a Firefox plugin
Jordi Rovira
caminant at gmail.com
Sat Oct 7 04:27:44 PDT 2006
Hello,
I'm trying to embed my small game engine in a firefox plugin. In order to
do this, i'd like to use SDL, so what i'm trying is to embed a simple SDL
example for now. I successfully create a plugin with SDL that renders and
receives events when embedded in a page, however it does it in its own
window, instead of the plugin area assigned by the browser. Right now i'm
working on the X-Windows version and if i succeed i'll try it on win32 too.
I' have the following information in C++ about this assigned area:
X origin = 8
Y origin = 128
Width = 256 // size assigned in the web page source
Height = 256
WindowID = 0x2a00001 // XWindows window ID ?
type :0 // this means it is a Window and not a Drawable (but what does this
mean?)
display :0x8959288 // X-Windows Display structure pointer
visual :0x806f398 // X-Windows Visual structure pointer
colormap :32
depth :24
Do you think this is enough information to initialize SDL using that area?
What i've tried until now is to set the environmemnt variables
SDL_WINDOWID and SDL_VIDEO_X11_VISUALID with the WindowID value and the
value obtained from XVisualIDFromVisual(visual). However this variables
don't seem to reach SDL, so i made a kind of bypass to make sure they are
read. Still it seems to crash when trying to initialise the video.
Has anybody tried something like this? Ant hint?
Thanks in advance!
j.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061007/cf121fba/attachment.htm
More information about the SDL
mailing list