gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
754 stars 174 forks source link

question about buffer swap #2827

Closed Nejsplitter closed 2 months ago

Nejsplitter commented 3 months ago

hi @gonetz , in vi.cpp what does this line do?

bNeedSwap = bCFB ? true : (gDP.colorImage.changed != 0);

and this one:

bNeedRender = (gDP.changed & CHANGED_COLORBUFFER) != 0;

also, is it possible to not use buffer swap at all like original gln64 did?

gonetz commented 2 months ago

bNeedSwap - swap buffers required. bCFB - color frame buffer was modified by CPU, we need to swap buffers to show these modifications gDP.colorImage.changed != 0 - there were modifications of color frame buffer since the previous VI_UpdateScreen() call

bNeedRender = (gDP.changed & CHANGED_COLORBUFFER) != 0; it means that there was a call of RSP_ProcessDList(), color buffer was changed and thus it should be rendered.

also, is it possible to not use buffer swap at all like original gln64 did?

Yes, but why?

Nejsplitter commented 2 months ago

understood, thanks for the answer gonetz