Black boxes covering everything

Sometimes this happens, and when it does, I have to take another 10 minutes to reconnect to the server, but it might even happen again. How do I fix this problem?
Imgur
Imgur

You are running out of video memory.