Hi,
I'm porting a game from MIDP to the BB API but the Screen classes' double buffering doesn't work like in GameCanvas. I can't do all the painting in the paint(g) method so I created an auxiliary buffer and in paint I draw the buffer, but I still get the flickerings:
Code:
theBuffer = new Bitmap(screenWidth, screenHeight);
theGraphics = Graphics.create(theBuffer);
protected void paint(Graphics graphics) {
super.paint(graphics);
graphics.pushContext(new XYRect(0, 0, screenWidth, screenHeight), 0, 0);
graphics.drawBitmap(0, 0, theBuffer.getWidth(), theBuffer.getHeight(), theBuffer, 0, 0);
graphics.popContext();
}
I draw everything in "theGraphics".