[EMAIL PROTECTED] wrote:
One requests a specific BufferStrategy like this:
[Window|Canvas].createBufferStrategy(int numBuffers,
BufferCapabilities caps)
How do I make a caps object that state that ANY flip-strategy is good, but just
fail if there is no flip possible?
You can do it like this:
try {
createBufferStrategy(2, new BufferCaps(true, true,
FlipContents.UNDEFINED));
} catch (AWTException e){
// flip is unavailable, create the best you have
createBufferStrategy(2);
}
This way if flipping bs (ugh, that didn't come out right) is available
you'll get, otherwise you'll get something we think is the best
under these conditions.
Do I have to test with all of BACKGROUND, PRIOR, COPIED and UNDEFINED? Or is UNDEFINED the
"any" or "fastest" when requesting? See, if a given setup can handle all of
them, but one is faster than the other, I'd like that..
Btw, will both "Accelerated" and "TrueVolatile" be true for all flip-style
BufferStrategies' ImageCapabilities?
Actually - I'd just like a method that gives me "the fastest, multibuffering,
non-tearing graphics possible", whether or not that is volatile or accelerated or
whatever. I guess one will have to make a testing-stage in the application, timing every
single combination and picking the fastest.
createBufferStrategy(2) with no parameters will generally be the best.
The only thing is that currently there's no simple way to request
a 'tear-free' (v-sync-ed) buffer strategy in Windowed mode.
We'll add public API for that in 7 hopefully.
Thanks,
Dmitri
===========================================================================
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".