Hardware accelerated graphics: Double buffered window?

Hello Everyone,

I have recently adopted Python for AI research at my University. I stumbled upon wxPython and was quite impressed with its elegance and ease of use for GUI creation. Compliments aside, I�m trying to figure out what classes to use for creating a double buffered window to draw to. I would like to create some visual 2D environments for some of my software agents (2D games essentially). I suspect wxPython will be fast enough as they will not be true games, but will require flicker free drawing and animation abilities plus some GUI widgets from wxPython (Hence why PyGame is not sufficient). I�m just trying to figure out what classes will yield the best results.

Currently I found the package:
     wx.lib.colourchooser.canvas
containing the Canvas class.

*Question* - Is this the class I should use for my drawing surface and then use the wx.Bitmap class to store my images to be drawn to the Canvas�s off-screen buffer? Or should I draw directly to a BitmapBuffer using my images and then blit the BitmapBuffer to the Canvas?

Thank you for your time, any help is greatly appreciated.

-Paul

···

_________________________________________________________________

From predictions to trailers, check out the MSN Entertainment Guide to the

Academy Awards� http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline1

Mr. Anonymous <aeronautics2412 <at> hotmail.com> writes:

*Question* - Is this the class I should use for my drawing surface and then
use the wx.Bitmap class to store my images to be drawn to the Canvas’s
off-screen buffer? Or should I draw directly to a BitmapBuffer using my
images and then blit the BitmapBuffer to the Canvas?

No. Have a look at the wiki:
http://wiki.wxpython.org/index.cgi/DoubleBufferedDrawing

Christian

Mr. Anonymous wrote:

I’m trying to figure out what classes to use for creating a double buffered window to draw to. I would like to create some visual 2D environments for some of my software agents (2D games essentially).

Is it going to be bitmaps or vector objects, and do want to be able to zoom and scroll?

if primarily vector and you want zooming, check out:

wx.lib.floatcanvas

or a newer version at:

http://www.mithis.com/~chrisb/

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov