implemented depthbuffer lock using atomicExch