The following gives erratic results - and I was wondering why (whether it would manifest itself as a bug on platforms other than windows - where GraphicsConfiguration objects don't all use the same ColorModel):-
Frame f = new Frame();
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = ((Graphics2D)f.getBufferStrategy().getDrawGraphics()).getDeviceConfiguration();
sometimes I get :-
othertimes I get :-
I guess pixfmt=0 is the pixelformat for describing the front page of a flipping strategy, I say that because pixfmt=0 is not an option available normally through graphicsDevice.getGraphicsConfigurations().
pixfmt=1 is avaiable through said method, (it is the default GraphicsConfiguration - atleast on my system)
If I use the Frame constructor Frame(GraphicsConfiguration gc), the GC I passed in is the GC i get back from graphics2d.getDeviceConfiguration().
Is it giving indeterminate results, because the front and back buffers in a page flipping strategy have different pixel formats (or atleast, different GraphicsConfiguration objects), and I am randomly geting either the front buffer, or the back buffer. (if this is the case - it seems like a bug in the making :S)
btw, this has little relevance to any app. im writing - I'm just trying to figure out exactly what is happening underneath the bonnet [US: hood] of java2d