(Glitch64) use dynamic memory allocation for frameBuffer, depthBuffer, buf