I fixed my problem. I had manually installed nVidia's graphics drivers before, and apparently I forgot to remove them through nVidia's script.
I've had Ubuntu's drivers installed for quite some time (apparently over nVidia's) with no problem until now, so I'm not sure how it made it this long before exploding.
For anyone else with this same issue, do this: uninstall Ubuntu's drivers (then restart), find nVidia's install script (if you deleted it, just redownload it) and run it with the --uninstall flag. It might say something like: "You screwed up and downloaded your package manager's version without removing this one! I'll try my hardest..." Just click OK and let it do its thing. Then restart, install Ubuntu's nVidia driver, restart again, and it should be working.
glxgears is running fine for me, with no errors.
Sorry for the simple, non-XBMC-related problem. If someone else has this issue in the future, maybe this will prevent other people from asking stupid questions.