Yes, you're not supposed to have access to Swing's buffer strategy.
In particular, there are cases where Swing doesn't use BS.
Why would you need access to it?
Thanks,
Dmitri
[EMAIL PROTECTED] wrote:
Swing's BufferStrategy doesn't seem to leave any explicit reference to the BS
it uses under its hood.
_jFrame = new JFrame();
build();
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenSize = toolkit.getScreenSize();
_jFrame.setSize((int) screenSize.getWidth(), (int)
screenSize.getHeight());
StaticGUIUtil.locateOnMiddleOfScreen(_jFrame);
_jFrame.setVisible(true);
// Can't create strategy before making the frame visible - strange, I'd
think it was opposite.
BufferStrategy bs = _jFrame.getBufferStrategy();
log.warn("Before:");
log.warn(" BS:" + bs);
if (bs != null) {
DebugStatics.dumpBufferCapabilities(bs.getCapabilities(), "//",
LineTake.logWarnLineTaker(log));
}
_jFrame.createBufferStrategy(3);
bs = _jFrame.getBufferStrategy();
log.warn("After:");
DebugStatics.dumpBufferCapabilities(bs.getCapabilities(), "//",
LineTake.logWarnLineTaker(log));
gives the following on my log:
[AWT-EventQueue-0] - Before:
8250 [AWT-EventQueue-0] - BS:null
8266 [AWT-EventQueue-0] - After:
8282 [AWT-EventQueue-0] - //BufferCapabilities: FullScreenRequired: false,
MultiBufferAvailable: false, PageFlipping: false, FlipContents: null - [EMAIL
PROTECTED]
8282 [AWT-EventQueue-0] - // FrontBuffer ImageCapabilities:
Accelerated:true, TrueVolatile:false - [EMAIL PROTECTED]
8282 [AWT-EventQueue-0] - // BackBuffer(s) ImageCapabilities:
Accelerated:true, TrueVolatile:false - [EMAIL PROTECTED]
So - Swing doesn't give me access to knowing which BS it actually uses under
the hood?
Will my attempt at changing the BS for Swing work?
[Message sent by forum member 'stolsvik' (stolsvik)]
http://forums.java.net/jive/thread.jspa?messageID=298061
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".