2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: Graphics function ChangeVPBitMap()
9 #include <aros/debug.h>
10 #include <graphics/gfx.h>
11 #include <graphics/gfxbase.h>
12 #include <graphics/view.h>
14 #include "graphics_intern.h"
16 /*****************************************************************************
19 #include <proto/graphics.h>
21 AROS_LH3(void, ChangeVPBitMap
,
24 AROS_LHA(struct ViewPort
*, vp
, A0
),
25 AROS_LHA(struct BitMap
*, bm
, A1
),
26 AROS_LHA(struct DBufInfo
*, db
, A2
),
29 struct GfxBase
*, GfxBase
, 157, Graphics
)
34 vp - pointer to a viewport
35 bm - pointer to a BitMap structure. This BitMap structure must be of
36 the same layout as the one attached to the viewport
37 (same depth, alignment and BytesPerRow)
38 db - pointer to a DBufInfo
55 ******************************************************************************/
59 /* This is a very basic implementation. Screen refresh is completely not in sync with VBlank.
60 The main problem here is that AROS completely misses VBlank interrupt. */
62 /* Insert a new bitmap, rebuild the viewport and reload current view */
63 vp
->RasInfo
->BitMap
= bm
;
65 driver_LoadView(GfxBase
->ActiView
, GfxBase
);
67 /* Reply both messages - the displayed bitmap has been swapped */
68 ReplyMsg(&db
->dbi_SafeMessage
);
69 ReplyMsg(&db
->dbi_DispMessage
);
72 } /* ChangeVPBitMap */