Re: The iPhone SDK OpenGL ES Application template

2009-07-22 Thread Wilson Chen
Thank you David for the tip! On Wed, Jul 22, 2009 at 5:11 AM, David Duncan david.dun...@apple.comwrote: On Jul 21, 2009, at 10:18 AM, Wilson Chen wrote: My question is: since an EAGLView is a subclass of UIView, is there a particular reason for the template to not follow the common pattern

The iPhone SDK OpenGL ES Application template

2009-07-21 Thread Wilson Chen
Hi all, For a typical iPhone application, after the application is finished launching, the app delegate would then 1) create an instance of UIViewController; 2) ask the view controller for its view which the controller creates on demand; 3) add the view as a subview of the window. I really like

Why do CFType instances respond to NSObject messages?

2009-07-16 Thread Wilson Chen
Hi all, I'm new to the Cocoa framework, and puzzled why the following code would work: CGLayerRef layer = ...assume we have a layer created. printf(Retain count after creation: %i\n, CFGetRetainCount(layer)); [(NSObject*)layer retain]; printf(Retain count after sending a retain message: %i\n,