This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. More...
Inherits UIView.
Public Member Functions | |
(id) | - initWithFrame: |
Creates a new VgEAGLView and as well as setting itself as the current context. | |
(id) | - initWithFrame:pixelFormat: |
(id) | - initWithFrame:pixelFormat:depthFormat:preserveBackbuffer: |
(void) | - startAnimation |
Responsible for creating the VisioDevKit application. | |
(UIImage *) | - captureToImage |
Captures the current GL Buffer and creates a UIImage. | |
(void) | - notifyDidReceiveMemoryWarning |
Notifies the view when the application receives a memory warning from the system. | |
Properties | |
BOOL | mRenderSuspended |
A Boolean indicating whether the EAGL View is rendered. | |
BOOL | mUpdateSuspended |
A Boolean indicating whether the EAGL View is updated, this is different from rendering. | |
UIInterfaceOrientation | mInterfaceOrientation |
The current orientation of the VgEAGLView. | |
VgApplication::VgIApplication * | mApp |
The entry point to the VisioDevKit. |
This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
The view content is basically an EAGL surface you render your OpenGL scene into.
- (UIImage*) captureToImage |
Captures the current GL Buffer and creates a UIImage.
- (id) initWithFrame: | (CGRect) | frame |
Creates a new VgEAGLView and as well as setting itself as the current context.
By default multiple touch support on the view is enabled. The default orientation is UIInterfaceOrientationPortrait.
frame | - default frame size of the view |
- (id) initWithFrame: | (CGRect) | frame | |
pixelFormat: | (NSString *) | format | |
- (id) initWithFrame: | (CGRect) | frame | |
pixelFormat: | (NSString *) | format | |
depthFormat: | (unsigned int) | depth | |
preserveBackbuffer: | (BOOL) | retained | |
- (void) notifyDidReceiveMemoryWarning |
Notifies the view when the application receives a memory warning from the system.
It should be called in the parent UIViewController::didReceiveMemoryWarning
The Apple documentation mentions, "It is strongly recommended that you implement this method. If your application does not release enough memory during low-memory conditions, the system may terminate it outright."
Calling this in your viewController implementation will allow the 3D view to adjust the balance between display-quality and memory consumption.
- (void) startAnimation |
Responsible for creating the VisioDevKit application.
This means it will call VgApplication::VgIApplication::createApplication on your behalf as well as initiating the animation timer responsible for invoking the render scene.
- VgApplication: [read, assign] |
The entry point to the VisioDevKit.
- (UIInterfaceOrientation) mInterfaceOrientation [read, write, assign] |
The current orientation of the VgEAGLView.
It is necessary to set this property manually for the VgEAGLView. Whenever this value is updated, the aspect ratio of the VgEAGLView is updated to match the new orientation.
- (BOOL) mRenderSuspended [read, write, assign] |
A Boolean indicating whether the EAGL View is rendered.
If NO, the the manipulator will be reset and the EAGL View is rendered. If YES, the EAGL View will not be rendered. By default value is NO.
- (BOOL) mUpdateSuspended [read, write, assign] |
A Boolean indicating whether the EAGL View is updated, this is different from rendering.
If NO, view will not be updated (no animation, interpretation of zoom, no loading of new tiles if position changes). View will not be rendered. By default value is NO.