: : : : I'm trying to make an offscreen Graphics world in a program I'm using macintosh think pascal to write. I've copied the code straight from the demo program of chapter thirteen from the macintoshpascal tutorial, but it doesn't work. As best I can figure it's not working because it can't make a Gworld, or it at least can't make a pointer to it. Does anyone have experience with this?
: : : :
: : :
: : : Tell you what. I don't have a MacIntosh, but I do know Pascal, so if you want to send me the code (or post it on the board here), I will look it over for you and see if I can find the problem.
: : :
: : : Phat Nat
: : I DID IT!!!!!! . I spent three hours changing, and rewriting stuff, and finally I got lucky, and it worked, although I'm not exactly sure why. For some reason it won't work if I use global variables, they need to be locals, that's what really screwed me up. My problem now is that it goes too slowly. The process of copying the image from the offscreen G world, to the window takes so long that I can only get 1-2 frames a second. I can speed it up slightly by using a smaller pixel depth, but only slightly, and I would like to keep that where it is. I'm using the CopyBits procedure. Is there another faster way to put the image drawn offscreen into a window?
: All depends on your code. What is taking up all the time? The screen copying procedure or the calculations that you are doing? Again I can't help you out alot because of the platform differences. What does the copybits procedure do? Copy pixel-by-pixel or a whole chunk of memory at once?
: Phat Nat
I believe pixel by pixel, a procedure that could take the entire variable at ounce would solve my problem, but can't find any. For more information about the copybits procedure look at http://developer.apple.com/techpubs/mac/QuickDraw/QuickDraw-166.html