Welcome, Guest. Please login or register.

Author Topic: Double buffering of WB?  (Read 2982 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Double buffering of WB?
« on: January 12, 2006, 09:46:34 PM »
How do you mean, double buffer the workbench screen? You mean the entire screen or just the window?

If you need to just double buffer the window area and you are aiming for RTG, your best bet is to simply AllocBitMap() an offscreen BitMap that is allocated using the workbench display's Screen->RastPort.BitMap as a friend (thus ensuring it is the same format and in video ram etc).

Create a new RastPort for this BitMap (so that you can use any OS routines that use RastPorts) and you can then render all your stuff to this offscreen BitMap.

When you need to update the window, you can simply use ClipBlit() to blit it to wherever you need it in your window.

It's always worked for me.
int p; // A