Show / Hide Table of Contents

Class GLWidget

The GLWidget is a GTK widget for which an OpenGL context can be used to draw arbitrary graphics.

Inheritance
GLArea
GLWidget
Namespace: OpenTK
Assembly: cs.temp.dll.dll
Syntax
[CLSCompliant(false)]
public class GLWidget : GLArea

Constructors

GLWidget()

Initializes a new instance of the GLWidget class.

Declaration
public GLWidget()

GLWidget(GraphicsMode)

Constructs a new GLWidget using a given GraphicsMode

Declaration
public GLWidget(GraphicsMode graphicsMode)
Parameters
Type Name Description
GraphicsMode graphicsMode

GLWidget(GraphicsMode, Int32, Int32, GraphicsContextFlags)

Initializes a new instance of the GLWidget class.

Declaration
public GLWidget(GraphicsMode graphicsMode, int glVersionMajor, int glVersionMinor, GraphicsContextFlags contextFlags)
Parameters
Type Name Description
GraphicsMode graphicsMode

The which the widget should be constructed with.

System.Int32 glVersionMajor

The major OpenGL version to attempt to initialize.

System.Int32 glVersionMinor

The minor OpenGL version to attempt to initialize.

GraphicsContextFlags contextFlags

Any flags which should be used during initialization of the .

Properties

ContextFlags

The set ContextFlags for this widget.

Declaration
public GraphicsContextFlags ContextFlags { get; }
Property Value
Type Description
GraphicsContextFlags

DeltaTime

Gets the time taken to render the last frame (in seconds).

Declaration
public double DeltaTime { get; }
Property Value
Type Description
System.Double

Methods

Destroy()

Destroys this , disposing it and destroying it in the context of GTK.

Declaration
public override void Destroy()

Dispose(Boolean)

Disposes the current object, releasing any native resources it was using.

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Finalize()

Destructs this object.

Declaration
protected void Finalize()

OnCreateContext()

Declaration
protected override GLContext OnCreateContext()
Returns
Type Description
GLContext

OnDrawn(Cairo.Context)

Called when the widget needs to be (fully or partially) redrawn.

Declaration
protected override bool OnDrawn(Cairo.Context cr)
Parameters
Type Name Description
Cairo.Context cr
Returns
Type Description
System.Boolean

OnInitialized()

Invokes the Initialized event.

Declaration
protected virtual void OnInitialized()

OnShuttingDown()

Invokes the ShuttingDown event.

Declaration
protected virtual void OnShuttingDown()

Events

GraphicsContextInitialized

Called when the first is created in the case where GraphicsContext.ShareContexts == true;

Declaration
public static event EventHandler GraphicsContextInitialized
Event Type
Type Description
System.EventHandler

GraphicsContextShuttingDown

Called when the first is being destroyed in the case where GraphicsContext.ShareContext == true;

Declaration
public static event EventHandler GraphicsContextShuttingDown
Event Type
Type Description
System.EventHandler

Initialized

Called when this GLWidget has finished initializing and has a valid .

Declaration
public event EventHandler Initialized
Event Type
Type Description
System.EventHandler

ShuttingDown

Called when this GLWidget is being disposed.

Declaration
public event EventHandler ShuttingDown
Event Type
Type Description
System.EventHandler
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX