#15 Use GL Displaylists to draw scanlines

open
nobody
None
5
2005-11-29
2005-11-29
Michael Carlson
No

Use an OpenGL compiled displaylist to draw scanlines in
ZSNES, instead of feeding in manual tex / vertex coords
each frame.

I'm using Linux/SDL, with a windows OpenGL video mode.
When running the ROM "Actraiser" without user input,
for exactly 30 seconds with 25% scanlines enabled,
auto-frame rate off (no skipping or limiting), oprofile
shows the number of clock cycles and % of total clock
cycles used.

Before my change:

618 0.2078 gl_drawwin
629 0.2117 gl_drawwin
600 0.1920 gl_drawwin

And after:

485 0.1569 gl_drawwin
534 0.1730 gl_drawwin
520 0.1685 gl_drawwin

It's not a dramatic change, and this function doesn't
use much CPU in the first place. But there seems to be
a clear trend that it is about 20% faster.

I'm still getting familiar with the zsnes code, this is
my first real *code* patch, so if there are any
problems with the style or anything feel free to tell
me how to improve.

Discussion

  • Use GL Displaylists to draw scanlines

     
    Attachments
  • Logged In: YES
    user_id=1362057

    On IRC I was told to enter this into zsnes bugzilla, at
    http://zsnes.ownaged.com/bugzilla/. I've done this, and it
    is bug #145.