Will SDL and GLUT work together?

Hey all, I’ve recently gotten the urge to move all my old 3d programs from
Windows to Linux. See, I do everything for school in Windows, 'cause I have
to, but I use Linux at home. So, I wanted to make my stuff work on both
Windows and Linux. On Windows, I use OpenGL and GLUT, with some Windows calls
to handle keyboard events. I tried using SDL to implement OpenGL on my Linux
box, but when I do, all event handling slows down to a halt. If I just use
SDL’s event handling and GLUT’s OpenGL rendering, everything’s fine. So…
what I would like to do is use GLUT for window creation and rendering, and
SDL for event handling and network issues. Is there any way the two can
coexist in one window? I say “one window” because in order to get SDL
keyboard handling, I have to start an SDL window and have it focused for
events to occur. I know this probably isn’t one diehard SDL fans want to
hear, but it still makes it portable, and that’s what I want. Thanks in
advance for help! (Hint hint, nudge, nudge…)–
Duncan “Bojangles” Domingue

-I cna ytpe 300 wrods pre mniute

If you’ve already tried this, and it’s involved in one of the aformentioned
problems, just ignore me:

Have you tried dropping the GLUT stuff and going 100% SDL? SDL has OpenGL
support already, and that way you don’t have to do WindowManager black-magic
to make SDL capture events from GLUT’s window. Besides, doing so probably
won’t be portable (which you emphasized a desire for).

  • Silicon.—
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.552 / Virus Database: 344 - Release Date: 12/15/2003

Thanks for the help, but yes, I’ve already tried going full SDL. I wish it
would work, but for some reason it slows down my program to a near halt. I
thought I might not have configured my system correctly, so I tried to
xf86config and use my card information rather than the generic info. Sadly,
that ruined my setup and I have to back-door it into my X server and get my
window manager running on another virtual console. I’ve checked my code, and
it looks like everyone else’s, and I’ve run other programs written entirely
in SDL and OpenGL, and they run fine (relatively speaking, my computer’s
really slow). If anyone can tell me what I might be doing wrong and how to
fix it, I’d be more than happy to make the switch back to 100% SDL. I like
its OpenGL and Blit option.–
Duncan “Bojangles” Domingue

-I cna ytpe 300 wrods pre mniute

Maybe you could post your code here so we can see if you’re setting something
up in a non-optimal way?

-Sean RidenourOn Sunday 21 December 2003 2:10 pm, Duncan Domingue wrote:

Thanks for the help, but yes, I’ve already tried going full SDL. I wish it
would work, but for some reason it slows down my program to a near halt. I
thought I might not have configured my system correctly, so I tried to
xf86config and use my card information rather than the generic info. Sadly,
that ruined my setup and I have to back-door it into my X server and get my
window manager running on another virtual console. I’ve checked my code,
and it looks like everyone else’s, and I’ve run other programs written
entirely in SDL and OpenGL, and they run fine (relatively speaking, my
computer’s really slow). If anyone can tell me what I might be doing wrong
and how to fix it, I’d be more than happy to make the switch back to 100%
SDL. I like its OpenGL and Blit option.