glGetIntegerv is a very handy function for getting whatever piece of information from your system supports from OpenGL and other non-OpenGL values.

My system coincidentally can support 2D and 3D textures at 8196x8196 and 8196x8196x8196 respectively. And after trying it on my Mac, I'd highly recommend try out GLview. Tells you a lot of useful information should you get deep into OpenGL and 3D programming.

GLview webpage