How can I deterine the available memory on the video card

Can anybody tell me how I can reliably determine the available video card memory in a jogl application. I have tried using

this.getGraphicsConfiguration().getDevice().getAvailableAcceleratedMemory() in the init method of a GLJPanel but it returns -1. I also noticed that the source comments for the displayChanged method initcated that it was a noop presently. Another question I have is, how does (or will) jogl handle the case of a dual head monitor system where each card has a different memory size, or must they both be the same.

I need this information to know how many Vertex Buffer Objects I can create in my application to make the most of the hardware available.

This is probably a question better suited for the OpenGL forums at opengl.org. I don’t think there are any ways using OpenGL APIs to make these kinds of queries, specifically because different video cards behave differently; some share system RAM, some have their own on-board RAM, and because the card uses RAM/VRAM for so many different things (the frame buffer, textures, display lists, VBOs, etc.) it’s difficult if not impossible for the app to do any manual management of this memory. I think some people use DirectDraw calls (which I think are used internally by the GraphicsDevice class) on Windows for this, though combining DirectDraw and OpenGL in the same app may be a mistake. What platform are you running on?

Dual-head systems work differently on each type of OS. I’m pretty sure that in almost all cases if you have two cards one will be slaved to the other. I think the best supported configuration by most manufacturers nowadays is to use a single card to drive two heads.

My application will run on linux, windows and mac, and it is being developed on linux. It seems I would better use swing to create some sort of hidden frame and then check the graphics capabilities there then guestimate a value of video memory available from that.

Another thing I might suggest is to not worry about the memory used and simply try using the data you intend to use. You might be very surprised by the performance you’ll see. AGP 4x can be quite fast, let alone 8x or PCI-Express.