• Post Reply Bookmark Topic Watch Topic
  • New Topic

BufferStrategy Question  RSS feed

 
Brandon Tom
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you create a BufferStrategy what is used by default? Is it double buffering or page-flipping.
 
Jeremy Tartaglia
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is taken from the Java 1.4.2 API documentation in java.awt.Window:

createBufferStrategy

public void createBufferStrategy(int numBuffers)
Creates a new strategy for multi-buffering on this component. Multi-buffering is useful for rendering performance. This method attempts to create the best strategy available with the number of buffers supplied. It will always create a BufferStrategy with that number of buffers. A page-flipping strategy is attempted first, then a blitting strategy using accelerated buffers. Finally, an unaccelerated blitting strategy is used.

Each time this method is called, the existing buffer strategy for this component is discarded.


I didn't know this either, but appearantly it depends entirely on the system.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!