[OpenJDK 2D-Dev] Question regarding GraphicsConfiguration/DisplayMode

Roman Kennke roman at kennke.org
Tue Mar 31 17:27:52 UTC 2009


I think my mental model regarding the GD/GC/DisplayMode API is a bit
messed up, or the API is a bit messed up.

So far I was always assuming that the GCs (as returned by
GD.getGraphicsConfigurations()) represent all the possible settings
(resolution, color model, etc) that the GD can use. BUT, then we also
have GD.getDisplayModes(). And GC is also used for Xinerama support,
right? So what does GC represent? I am implementing on an embedded
platform right now, I only have one screen, but a couple of different
settings, and would like to know what is correct here. Is there a
relationship between the list of display modes and the list of GCs? If
so, how are color models in DisplayMode handled? I only see a bitDepth
property there, but for example how to differenciate between a RGB565
and RGB556 setup in the DisplayMode API?

Then: what is the default configuration? Is it just some random
configuration that is considered the default? Is it the one currently in
use? Does it relate to getDisplayMode()?

What is (and how to use) GD.getBestConfiguration()? The
GraphicsConfigTemplate class seems pretty useless to me.

Thanks in advance for your hints,


More information about the 2d-dev mailing list