This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Native rendering on AWT Canvas

 
Soren Therkildsen
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,
I am using the AWT native interface for native rendering in a
Java window as described in:
http://java.sun.com/j2se/1.3/docs/guide/awt/AWT_Native_Interface.html
I would like to choose a graphics configuration for the Canvas,
which supports double buffering.
Right now I choose the graphics configuration with the following
piece of code:
GRAPH_CONF = 0;
GraphicsEnvironment genv =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = genv.getDefaultScreenDevice();
GraphicsConfiguration[] gc = gd.getConfigurations();


Canvas gl_canvas = new Canvas( gc[GRAPH_CONF] );
It seems that no matter which entry in the gc array I choose
there is no support for double buffering. It is the same on
all the Windows PC's I have testet this on.
I would like to know if there is a way to force the Canvas to
support double buffering.
Any comments are very welcome.
Kind regards
Soren Therkildsen
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic