> [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.

Okay, so "UNDEFINED" is actually the "I don't care" option when requesting?

Also, I don't find that constructor taking "true, true" - only one taking two 
ImageCapabilities

> Btw, will both "Accelerated" and "TrueVolatile" be
> true for all flip-style BufferStrategies'
>  ImageCapabilities?

You didn't answer the above.. Care to? (It would go into the pool of "nice to 
know - maybe it will be immensely useful at some point")

> 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.

Please do! And make things explicit. Make the BufferStrategy in Swing explicit. 
Basically, make Swing be an actual disjoint layer above AWT/Java2D, utilizing 
ONLY the public, userfacing APIs of AWT/Java2D to work (I don't really know how 
far from that it is at this point - but I still feel there are some magic 
involved..)
[Message sent by forum member 'stolsvik' (stolsvik)]

http://forums.java.net/jive/thread.jspa?messageID=298147

===========================================================================
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".

Reply via email to