Re: drawing an array of pixels to the screen
Re: drawing an array of pixels to the screen
- Subject: Re: drawing an array of pixels to the screen
- From: Erik Buck <email@hidden>
- Date: Mon, 12 Nov 2007 06:38:59 -0800 (PST)
There seems to be some confusion.
In C, the following two arrays are interchangeable:
int twoDArray[100][500];
int oneDArray[100 * 500];
Both occupy the same amount of memory. They can be cast back and forth harmlessly. Both are of the following assignments are legal and meaningful:
int *array = twoDArray;
int *array = oneDArray;
Both styles of array decalartion are usable with -initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel
and with openGL.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden