C (135/207)

From:Duane McDonnell
Date:22 Dec 99 at 03:07:53
Subject:Re: SUPERBITMAP window

From: Duane McDonnell <dmcdonnell@primus.com.au>

InitBitMap() isn't enough to set up a BitMap. Are you filling in
the plane pointers array manually? Are you seeing valid data on
the screen when you try to address it?

ScrollVPort() will indeed do as you describe. As for the how part,
all is revealed in the AutoDocs. How RTG patches implement this
is private, but from an OCS/ECS/AGA point of view all this function
does is recalculate the bitplane pointers and write them back into
the BPLx copper registers in the ViewPort's copperlist ready for
the next frame so you get very cheap double buffering
(graphics.library doesn't need to call MergeCop() just to do
buffering, hence it's a pretty cheap call).

ChangeVPBitMap() is another alternative which allows you to implement
buffering by swapping BitMaps (rather than scrolling a large BitMap
like ScrollVPort() does). This one is somewhat more complicated to
use than ScrollVPort() but does have the advantage that you can
implement correct triple buffering of a ViewPort or Intuition
screen (very useful for "out of frame" rendering like 3D games).
Many people, myself included, have reported weird results with
the syncing method employed. It could be caused by some problem
with the function or just plain ol' lack of documentation. In any
case, you can ditch the graphics.library syncing and replace it
with your own which is what I do when triple buffering in AGA
screens (so there's no Signal()'ing when buffering, just simple
counter comparison - I can explain the method if you're interested).
Unfortunately, I don't think ChangeVPBitMap() is patched by CGFX
(I'm pretty sure the function's complexity is the reason why...)
so you'll need to confine yourself to ScrollVPort() if you
want RTG support.

That's about as much information as I can give you without knowing
the specific problem you're encountering.

>i open a superbitmap window and i give a pointer to a bitmap (opened with
>InitBitMap()). The screen is a 640x480 one. So the window's bitmap is
>640x960 (480x2) as i want to do double buffer. All is ok.
>But i want to swap of position between (0,0) and (0,480) to simulate the
>double buffer. My question is HOW ????
>How can i move inside the bitmap ?
>I heard about ScrollVPort(), but i dont ee why.....