Looking at JOGL’s API I don’t think it is possible. Googling for OpenGL video card memory turned up poor results. It looks like most of the ways that you check are through OS specific windowing APIs and isn’t part of the OpenGL spec.
[quote]If you need to find out how much video memory your video card has, you need to ask the OS. GL doesn’t provide a function since GL is intended to be multiplatform and on some systems, there is no such thing as dedicated video memory.
[/quote]
Humm… what do we know that is multi platform and allows us to talk to the graphics card…
there is no standardised way to query HW info via OpenGL. You could use JOCL and device.getGlobalMemSize() (and the other getFooMemSize() methods) but those are implementation dependent and usually return less than the physical mem size.
Java binding of SDL is really crappy (and SDL itself becomes crappy too), I think it could be a source of inspiration to find a nice way of querying the total video memory. However, in my humble opinion, you will never find a nice cross-platform way of getting such an information. After some searches, you cannot even query this info with the same way if you use Vista/7 or XP; in one case, WMI works. Rather use another approach, try to detect OpenGL errors, especially out of memory errors when they occur.
but this is the JOGL section and he is asking for help. Imagine that you have a problem with your General Motors car, someone comes to you, you think that he is going to help you. Instead of helping you, he tries to sell an Audi car, it does not solve your problem and I’m sure you would be disappointed in such a situation.
The difference being that Cas doesn’t sell anything here, he’s offering a possible and practical path to a solution.
Following your analogy, if JOGL is a free Opel and LWJGL a free Audi, I might be tad disappointed with General Motors for not having the same attitude
The “solution” proposed by princec is not a solution to this precise problem for a JOGL user, it is not a solution that uses JOGL. Therefore, my analogy is fine except that both bindings are free of charge. This is the JOGL section, proposed solutions have to use JOGL. If someone hesitates between the use of both bindings, it is not the appropriate place to speak about it. If JOGL was abandoned, I would understand that some people would suggest alternative APIs as we already do for Java3D but it is not the case, JOGL is alive.
I’m having difficulty understanding why this restriction is necessary. It seems like an arbitrary rule that can only reduce the quality and amount of help that the forum can offer. Could you perhaps explain what undesirable outcome it is protecting us from?
This issue was also the reason the two forms were merged into one so that resources of all opengl developers can be pooled/shared in one area so everyone can benefit (also so any silly flame wars can be avoided), if I remember correctly it was just a technical issue/limitation at the time which prevented this.