Query Video Card Info (Video Memory size?)

I wish to query the Video Card info by
pure OpenGL API, is it available?

glGetString(GL_VENDOR);
glGetString(GL_VERSION);
glGetString(GL_RENDERER);
glGetString(GL_EXTENSIONS);

I use above to query some info,
But I want to know the available video
memory, How to do it?
In D3D, I could use

IDirectDraw4::GetAvailableVidMem or
IDirect3DDevice8::GetAvailableTextureMem

But I don’t want to use any D3D API,
is another method to get video memory info?

Thanks in advance

Macbear

No, you can’t query that in OpenGL.

To a certain extent, the texture proxy mechanism can give you some hints about whether a texture could fit in video mem or not.

You can also assign priorities to textures to help the implementation decide which textures should stay in video mem (note that priorities are just hints, and can be ignored by the implementation). To know if some textures are resident, you can use glAreTextureResident(). That’s about all you can do in OpenGL to control video memory usage.