On Dec 15, 2009, at 2:50 AM, gMail.com wrote:

Da: Andrew Farmer <andf...@gmail.com>
Data: Mon, 14 Dec 2009 20:17:41 -0800

On 14 Dec 2009, at 11:06, gMail.com wrote:
Handle           imagesH = NewHandleClear(totImages * oneImageSize);

Wait, Handle? NewHandleClear? Your use of these functions suggests that you may be working from a dangerously old textbook. There's really no reason to
use them in new code.

Ouch! That's my old code. But it works on
64-bit Intel, Base SDK 10.6, x86_64, GCC 4.2, Target Mac OS X 10.6
I need an handle to store image bitmap data for later reuse by the OpenGL
API  "glTexImage2D". Do you know a better way?

There's no good reason why it has to be a handle. Use an NSMutableData or even just malloc a chunk of the heap.

Handles have an unnecessary level of indirection. Back in the day, that came with relocatability, but it doesn't anymore. It's just obscure and excessively complicated.

Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to