Added CALLBACK for compilation in MinGW and fixed bugs in cutout rendering.