buffering
you can't just draw to the screen. if you do it'll look crappy. whatever you're drawing will flicker visibly. unacceptable. so you draw to a back buffer while the video card shows the previously drawn front buffer. this is called double buffering. when you're done drawing you tell the video card to swap the front and back buffers. it doesn't actually move any memory. which would be really slow. it just changes pointers. which is really fast. but you can't just do that any old time. if you swap buffers after the top half of the screen has been drawn you'll see what is called tearing. for obvious reasons. also unacceptable. so you wait for vertical sync. then swap buffers when nothing is actually being drawn at that moment. but suppose you can't wait. whatever it is you're drawing is being collected or created in real time and cannot acquiesce to the whims of your video card. if it comes in slower there's no problem right? the video card simply repeats the front buffer if no new back buffer is ready. but if the video card is slower then we need to triple buffer. ie one front buffer and two back buffers. we draw to one of the back buffers. then immediately start drawing to the other. the video card will swap the front buffer with whichever of the back buffers is ready. works great when it works. last week's fire drill was because triple buffering is broken on some computers. sigh. the driver was simply cycling between the three buffers. and blocking when we asked for a free back buffer. frikken idiots. that's the point of triple buffering. you can't block the calling processes. ever. so now we're quintuple buffered. which is just frikken offensively brilliant. i put a correctly working triple buffering thing between the drawing routines and the (now) double buffered video card. wee.