Understanding EAGLView
I am going through the EAGLView files from the apple iphone sample code and I am trying to understand how the EAGLViewDelegate protocol works.
Question:
How is this function called didResizeEAGLSurfaceForView
? I don't see an implementation?
EAGLView.h
@protocol EAGLViewDelegate <NSObject>
- (void) didResizeEAGLSurfaceForView:(EAGLView*)view;
//Called whenever the EAGL surface has been resized
@end
@interface EAGLView : UIView
{
@private
id<EAGLViewDelegate> _delegate;
}
@property(assign) id<EAGLViewDelegate> delegate;
EAGLView.m
@implementation EAGLView
@synthesize
delegate = _delegate,
//......
@end
+1
user48210
source
to share
1 answer
I am assuming you are referring to the CrashLanding, GLGravity, or GLPaint samples, as these are the only samples I can find in this protocol. DidResizeEAGLSurfaceForView: Called in the MyEAGLView -_createSurface method. However, this method is not implemented anywhere because the delegate is not configured for MyEAGLView in any of these samples.
So no, I don't think you are missing anything. It looks like rudimentary code.
+1
Brad larson
source
to share