CompuServe Thread

Forum unknown · Modula-2

Mod-2 DBuf

5 messages in this thread
#117317From: Leon FrenkelApr 3, 1988 8:21 PM
Hi Jim: The SimpleDBuf module works such that when you draw to the screen's RastPort the output goes to the alternate buffer. The FlipDBufScreen() procedure swaps the BitMap ptrs in the RastPort and ViewPort, however if you have opened a window the window's RastPort will not be swapped. My recomendation is to avoid using menus on double-buffered screens. If you decide to do it though make sure the window's RastPort BitMap ptr is set to the correct bitmap.
#117475From: Jim VogelApr 4, 1988 7:05 PM
no, that was a lot of help. When I use create Window, and it opens it's own Rastport, Can I then assign it rastPort to the Dbuf RastPort, and then freeMem size of rastport, or would it be better to save the rastport, and reassing it, and then close it when I close the window? Also, I am having some trouble with FindImg, or actually the way to use it. I had a Dbuf 320x200x5 window and could see the Bob's that I imported using addimg, but the Vsprite's were not the correct shape. When I changed the window to 640x400x3, still dbuf, I lost the bob, but got the sprite! The bob was still there, because I could see the bob bouncing off of it, but could not see it. Cute, but not what I wanted! I suspect it has something to do with the colors, for the screen, teh sprite and the bob, and hwo they are all different, but just can't seem to get it to work right. The images are drawn with Aegis Image's low res, 320×640 I think, maybe only 320×200(oops, first was 320×400). I have the high res version, but not sure how that will work! Also in the CollDemo in gels, on the demo disk, you have a procedure called init, in which you set up color reg for the screen. In it you use LoadRGB4, with the 3rd par as 32. I was under the impressin the that was not the number of colors you loaded, but how many bit's you used to tell what color it was. SO should that be 12? Or am I misuunderstanding what I read? I read this on pg 34 of the RKM, lib's and dev's.
#117503From: Leon FrenkelApr 4, 1988 11:42 PM
The answer to your first question is don't deallocate any memory this is not the right thing to do. I think its best not to use menus with double buffered screens, but if you must this will require some care. The answer to the second question is that 32 specified the number of color registers to load which is correct. Avant-Garde Software (214)-964-0260
#117503From: Leon FrenkelApr 4, 1988 11:42 PM
The answer to your first question is don't deallocate any memory this is not the right thing to do. I think its best not to use menus with double buffered screens, but if you must this will require some care. The answer to the second question is that 32 specified the number of color registers to load which is correct. Avant-Garde Software (214)-964-0260
#117475From: Jim VogelApr 4, 1988 7:05 PM
no, that was a lot of help. When I use create Window, and it opens it's own Rastport, Can I then assign it rastPort to the Dbuf RastPort, and then freeMem size of rastport, or would it be better to save the rastport, and reassing it, and then close it when I close the window? Also, I am having some trouble with FindImg, or actually the way to use it. I had a Dbuf 320x200x5 window and could see the Bob's that I imported using addimg, but the Vsprite's were not the correct shape. When I changed the window to 640x400x3, still dbuf, I lost the bob, but got the sprite! The bob was still there, because I could see the bob bouncing off of it, but could not see it. Cute, but not what I wanted! I suspect it has something to do with the colors, for the screen, teh sprite and the bob, and hwo they are all different, but just can't seem to get it to work right. The images are drawn with Aegis Image's low res, 320×640 I think, maybe only 320×200(oops, first was 320×400). I have the high res version, but not sure how that will work! Also in the CollDemo in gels, on the demo disk, you have a procedure called init, in which you set up color reg for the screen. In it you use LoadRGB4, with the 3rd par as 32. I was under the impressin the that was not the number of colors you loaded, but how many bit's you used to tell what color it was. SO should that be 12? Or am I misuunderstanding what I read? I read this on pg 34 of the RKM, lib's and dev's.