Hi there,
I’m testing a new version of AlteredSaver for Linux using SDL - nice
library!
[FYI - current non-SDL version at
http://www.AlteredWorlds.com/linux/altered-2.11-full.tar.gz 6.8MB]
In order to function the way I need, I need to be able to supply a
Window ID, use the visual on the window, and display on this window at
the correct size. I’ve included below my X11 code that does this
already.
Can SDL work in this way? I noticed a SDL_WINDOWID environment variable
that can be set, but couldn’t find any description / examples of this
usage.
Also, I’m suspicious that this may not as yet work for OpenGL?
thanks very much for your help,
Tom Gilbert
Owner, Lead Engineer, AlteredWorlds
http://www.AlteredWorlds.com
=============CODE SAMPLE==============
if (useCmdLineWin)
{
XVisualInfo vi_in;
int out_count;
XWindowAttributes xgwa;
awWin = useCmdLineWin;
XGetWindowAttributes (awDpy, awWin, &xgwa);
vi_in.screen = scrnum;
vi_in.visualid = XVisualIDFromVisual(xgwa.visual);
visinfo = XGetVisualInfo(awDpy, VisualScreenMask|VisualIDMask,
&vi_in, &out_count);
AWTRACE2("\nAlteredSaver - Window %x Visual %x
\n\n",awWin,vi_in.visualid);
}
…
ctx = glXCreateContext( awDpy, visinfo, NULL, True );
XSync(awDpy, false);
glXMakeCurrent( awDpy, awWin, ctx );