Path: utzoo!attcan!uunet!lll-winken!ames!pasteur!ucbvax!husc6!mit-eddie!apollo!scoville_w From: scoville_w@apollo.COM (William Scoville) Newsgroups: comp.sys.apollo Subject: Re: GPR Double Buffering Message-ID: <432cf918.d17f@apollo.COM> Date: 12 May 89 11:10:00 GMT References: <8905111834.AA15992@umix.cc.umich.edu> Organization: Apollo Computer, Chelmsford, Mass. Lines: 44 I believe gmr3d does double buffering via software, if hardware doesn't support it, while gpr only double buffers if it can use hardware. If you wanted to "double buffer" on a node without 2 buffers, you could play with the color maps, (I believe this is what gmr3d does). What you do is make two color maps, one that makes planes 0-3 visible, and another that makes planes 4-7 visible. When create the color maps, you set your color values to ignore either the upper 4 bits or lower 4. That is instead of just setting pixel value 0x01 to red (for example), you also need to set 0x11 to red, 0x21, 0x31 etc. For the other map, you do just the opposite. make value 0x10 = red, 0x11, 0x12 etc. Do this for all the colors on both maps (it will allow you to use 15 colors). Then use two pixel values to draw the "buffers". For example, if I wanted to draw with a pixel value of 1, When drawing to the first buffer I would use a value of 0x01, but when drawing to the second buffer, I would use 0x10. This could easily be done by saying : if (buffer_two) draw_value = color value << 4; else draw_value = color_value; Then by swaping the color maps I could make one buffer invisible, and make the other visible. You also need to set the plane mask to mask off the planes you are displaying while you draw the others. This should allow clears and blts to work without effecting the visible buffer. This method should really only be used in borrow mode, or you'll be making the other pads+DM appear and disappear. -BS- Internet: scoville_w@apollo.com (preferred) UUCP: ...{decwrl!decvax, mit-eddie, attunix}!apollo!scoville_w USPS: mailstop chr 03 dw, Apollo Computer, 330 Billerica Rd., Chelmsford MA. 01824