Public Member Functions | Properties

VgEAGLView Class Reference

This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. More...

Inherits UIView.

List of all members.

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::VgIApplicationmApp
 The entry point to the VisioDevKit.

Detailed Description

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.


Member Function Documentation

- (UIImage*) captureToImage

Captures the current GL Buffer and creates a UIImage.

Returns:
Pointer to UIImage.
Note:
The screen need not to be displaying the GL context. It can return nil, if not enough resources.
- (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.

Note:
If not stipulated, the following defaults are used; pixel format set to kEAGLColorFormatRGBA8, depth format set to GL_DEPTH_COMPONENT16_OES and the preserve back buffer is disabled.
Parameters:
frame- default frame size of the view
Returns:
A newly initialized VgEAGLView.
- (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.


Property Documentation

- 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.

Note:
currently landspace view is not fully supported.
- (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.

Remarks:
It's important to use the getter/setter interface method (i.e. [myVgEAGLView setRenderSuspended:NO]) for this property to ensure the manipulator is reset.
- (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.

Remarks:
It's important to use the getter/setter interface method (i.e. [myVgEAGLView setUpdateSuspended:NO])

The documentation for this class was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013