added two new global pointers in demo.h: vmem_back and vmem_front, and
authorJohn Tsiombikas <nuclear@mutantstargoat.com>
Sun, 11 Sep 2016 04:47:44 +0000 (07:47 +0300)
committerJohn Tsiombikas <nuclear@mutantstargoat.com>
Sun, 11 Sep 2016 04:47:44 +0000 (07:47 +0300)
commit5d9ec41cc62ebddf5d406511714e561e88884987
tree237c6905b4a50f356d9cba279c1fb8f5662db397
parentf48bebd0c67210cd8b56e7d491b4942971e34ed1
added two new global pointers in demo.h: vmem_back and vmem_front, and
now parts need to call swap_buffers manually. This allows the
flexibility to have some parts write to video memory directly
(vmem_back) and then do an extremely fast page-flip by calling
swap_buffers(0). Other parts that prefer to write to a system-ram
framebuffer can continue to use fb_pixels, but they now have to call
swap_buffers(fb_pixels), to copy the result to vmem_front.
vmem_back and vmem_front at the moment point to the front buffer, until
I implement VBE page flipping, and in any case they may still both
point to the front buffer if there isn't enough memory for two pages,
so don't memcpy from one to the other manually. Use swap_buffers only.
src/3dgfx.h
src/demo.c
src/demo.h
src/dos/main.c
src/fract.c
src/grise.c
src/polytest.c
src/sdl/main.c
src/tunnel.c