[MacGLQuake] Anybody here?

pOx pox@planetquake.com
Thu, 27 Jul 2000 15:15:36 -0400


Is anyone is still hacking this puppy?

I've been going over the source for the last couple weeks and found a couple
things that should boost framerates (dramatically for 3Dfx cards), as well
as a couple fixes;

#1 - in 'gl_vidmac.c' around line 380:
The window is offset by 1 pixel - Changing it to 0,0 will more than double
FPS on 3Dfx cards (well, at least on my Voodoo3 it does) - I'm not sure if
this will help other accelerators.

// create a window to draw into
    AuxWinHandle awh;
    if (windowed) {
        gWindowRect.top = 30; gWindowRect.left = 5;
    } else {
        gWindowRect.top = 0; gWindowRect.left = 0;// pOx
    }

#2 - in 'sys_mac.c' around line 970, in the main loop:
I noticed the note in the HandleEvents routine and it does indeed help to
skip events during rendering (extra 5-10fps on my system)
I've got it set to;

    if (cl.paused)
        HandleEvents();
    else
        FlushEvents(everyEvent,0);

But I'm not sure that it's necessary to handle events even when paused (just
flush'em all the time)

#3 - in 'host_cmd.c' - search for 'Sys_FileClose' & 'Sys_FileOpenRead'
I'm guessing save/load game was missed by whoever re-did the mac filesystem
routines - Just change the above to 'Sys_fclose(f)' & 'Sys_fopen(f)' to fix
some nasty crashes. (Should also get rid of the calls/vars that grab
filehandles directly)

That's it - With the changes to sys_mac & gl_vidmac 'timedemo demo1' now
runs at an average fps in the low 90's compared to mid 30's with
MacGLQuake0.7 (again, this is probably a Voodoo thing, but other cards
should see a little increase as well)

Frank Condello (aka 'pOx')
--