Class OpenGLView
An iOS OpenGL view.
Inheritance
Implements
Namespace: FM.LiveSwitch.Cocoa
Assembly: FM.LiveSwitch.Cocoa.dll
Syntax
public class OpenGLView : UIView, IGLKViewDelegate
Constructors
OpenGLView()
Initializes a new instance of the OpenGLView class.
Declaration
public OpenGLView()
OpenGLView(CGRect)
Initializes a new instance of the OpenGLView class.
Declaration
public OpenGLView(CGRect frame)
Parameters
| Type | Name | Description |
|---|---|---|
| CGRect | frame | Frame used by the view, expressed in iOS points. |
Remarks
This constructor is used to programmatically create a new instance of UIView with the specified dimension in the frame. The object will only be displayed once it has been added to a view hierarchy by calling AddSubview in a containing view.
This constructor is not invoked when deserializing objects from storyboards or XIB filesinstead the constructor that takes an NSCoder parameter is invoked.
OpenGLView(CGRect, LayoutScale)
Initializes a new instance of the OpenGLView class.
Declaration
public OpenGLView(CGRect frame, LayoutScale scale)
Parameters
| Type | Name | Description |
|---|---|---|
| CGRect | frame | The frame. |
| LayoutScale | scale | The scale. |
OpenGLView(LayoutScale)
Initializes a new instance of the OpenGLView class.
Declaration
public OpenGLView(LayoutScale scale)
Parameters
| Type | Name | Description |
|---|---|---|
| LayoutScale | scale | The scale. |
Properties
Scale
Gets the scale.
Declaration
public LayoutScale Scale { get; }
Property Value
| Type | Description |
|---|---|
| LayoutScale | The scale. |
Methods
DestroyGL()
Destroys GL.
Declaration
public bool DestroyGL()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
DoDestroyGL()
Do Destroys GL.
Declaration
public void DoDestroyGL()
DrawInRect(GLKView, CGRect)
Draws the in rect.
Declaration
public void DrawInRect(GLKView view, CGRect rect)
Parameters
| Type | Name | Description |
|---|---|---|
| GLKView | view | The view. |
| CGRect | rect | The rect. |
InitializeGL()
Initializes GL.
Declaration
public bool InitializeGL()
Returns
| Type | Description |
|---|---|
| System.Boolean |
LayoutSubviews()
Lays out subviews.
Declaration
public override void LayoutSubviews()
Remarks
The default implementation of this method does nothing on iOS 5.1 and earlier. Otherwise, the default implementation uses any constraints you have set to determine the size and position of any subviews.
Subclasses can override this method as needed to perform more precise layout of their subviews. You should override this method only if the autoresizing and constraint-based behaviors of the subviews do not offer the behavior you want. You can use your implementation to set the frame rectangles of your subviews directly.
You should not call this method directly. If you want to force a layout update, call the setNeedsLayout method instead to do so prior to the next drawing update. If you want to update the layout of your views immediately, call the layoutIfNeeded method.
RenderBuffer(VideoBuffer)
Renders the buffer.
Declaration
public void RenderBuffer(VideoBuffer buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| VideoBuffer | buffer | The buffer. |