Path: utzoo!mnetor!uunet!oddjob!hao!ames!eos!aurora!labrea!decwrl!decvax!dartvax!eleazar!obie From: obie@eleazar.Dartmouth.EDU (Timothy D. Notestein) Newsgroups: comp.sys.amiga Subject: Bobs and Double Buffering Message-ID: <8259@eleazar.Dartmouth.EDU> Date: 25 Feb 88 17:05:32 GMT Reply-To: obie@eleazar.Dartmouth.EDU (Timothy D. Notestein) Followup-To: comp.sys.amiga Distribution: comp.sys.amiga Organization: Dartmouth College, Hanover, NH Lines: 70 Keywords: bobs, graphics, animation, buffering Summary: How do I get DBuffer to work? [ is there really a line eater? only in isolated galaxies.... ] On page 149 of the RKM Libraries and Device Manual, we are informed that it is indeed possible to have double-buffered blitter objects. I have not, as of yet, seen any source code that is using this precise feature. Now, I have seen nifty display hacks that use double buffering as an aspect of the viewport. However, this is not good for me, as intuition in general doesn't take well to double buffering, and I really do need the intuition environment existing peacefully as well. Basically, I'm writing an application that requires that the user be able to drag icons around on the screen. Currently, the icons are so large (1/8th of screen apiece) that the irritating flicker is ever-present whenever dragging the icons. Without attempting double-buffering on the part of the bobs, everything is functioning properly, w/ exception of the flicker. If I allocate DBufPacket for my bob, preset BufY, BufX coordinates (this shoudn't (?) make any difference; set BufPath to NULL; set BufBuffer to an allocated array the same size as my previous SAVEBACK array. struct DBufPacket my_icon_dbuf[number_of_icons] = { 0,0, /* BufY, BufX */ 0, /* BufPath */ &drawingDB[0] /* BufBuffer */ }, .... When declaring my actual bob...icon/images struct MyIcon {struct Bob, Gadget} my_icon[number_of_icons] { { 0, &faceSave[0], &faceMask[0], NULL,NULL, &faceVS, /* virtual sprite */ NULL, &my_icon_dbuf[0], 0 }, ... This is all that the RKM says is necessary for bob double-buffering. Is there something that I'm missing? Do i HAVE to have the Rastport set up for double-buffering, or anything like that? Do I have to add the bob twice? (I notice that it's documented that if double-buffering, you may have to remove it twice, but it doesn't mention AddBob()) Is there some maintainence that has to be done by my program everytime I move a bob or something? Symptoms: The display comes up okay, but when I drag an icon around, it's leaving bits and pieces of itself behind. As well, if part of one icon passes under another (sorry, when I say icon, I DO mean bob), then I get a kind of double-flickering affect, kind of.. (NOW YOU SEE IT, NOW YOU DON'T). But, I also don't notice any movements being at ALL smoother. Anyone have any ideas/suggestions? Also, if anyone has public domain source code that accomplishes something along these same lines, I WOULD GREAT appreciate it if you could forward it, so I can get a grasp on what I'm doing wrong. Thanks in advance, Tim