C# Class OpenTK.GLControl

OpenGL-aware WinForms control. The WinForms designer will always call the default constructor. Inherit from this class and call one of its specialized constructors to enable antialiasing or custom GraphicsModes.
Inheritance: System.Windows.Forms.UserControl
Afficher le fichier Open project: prepare/HTML-Renderer Class Usage Examples

Private Properties

Свойство Type Description
GLControl System
GrabScreenshot System.Drawing.Bitmap
InitializeComponent void
ValidateState void

Méthodes publiques

Méthode Description
GLControl ( OpenTK.Graphics.GraphicsMode mode ) : System

Constructs a new GLControl with the specified GraphicsMode.

GLControl ( OpenTK.Graphics.GraphicsMode mode, int major, int minor, GraphicsContextFlags flags ) : System

Constructs a new GLControl with the specified GraphicsMode.

GetEglDisplay ( ) : IntPtr
GetEglSurface ( ) : IntPtr
MakeCurrent ( ) : void

Makes the underlying this GLControl current in the calling thread. All OpenGL commands issued are hereafter interpreted by this GLControl.

SwapBuffers ( ) : void

Swaps the front and back buffers, presenting the rendered scene to the screen.

Méthodes protégées

Méthode Description
ChildCtorOnlyResetGraphicMode ( OpenTK.Graphics.GraphicsMode mode ) : void
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnHandleCreated ( EventArgs e ) : void

Raises the HandleCreated event.

OnHandleDestroyed ( EventArgs e ) : void

Raises the HandleDestroyed event.

OnPaint ( PaintEventArgs e ) : void

Raises the System.Windows.Forms.Control.Paint event.

OnParentChanged ( EventArgs e ) : void

Raises the ParentChanged event.

OnResize ( EventArgs e ) : void

Raises the Resize event. Note: this method may be called before the OpenGL context is ready. Check that IsHandleCreated is true before using any OpenGL methods.

Private Methods

Méthode Description
GLControl ( ) : System
GrabScreenshot ( ) : Bitmap
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

ValidateState ( ) : void

Method Details

ChildCtorOnlyResetGraphicMode() protected méthode

protected ChildCtorOnlyResetGraphicMode ( OpenTK.Graphics.GraphicsMode mode ) : void
mode OpenTK.Graphics.GraphicsMode
Résultat void

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Résultat void

GLControl() public méthode

Constructs a new GLControl with the specified GraphicsMode.
public GLControl ( OpenTK.Graphics.GraphicsMode mode ) : System
mode OpenTK.Graphics.GraphicsMode The OpenTK.Graphics.GraphicsMode of the control.
Résultat System

GLControl() public méthode

Constructs a new GLControl with the specified GraphicsMode.
public GLControl ( OpenTK.Graphics.GraphicsMode mode, int major, int minor, GraphicsContextFlags flags ) : System
mode OpenTK.Graphics.GraphicsMode The OpenTK.Graphics.GraphicsMode of the control.
major int The major version for the OpenGL GraphicsContext.
minor int The minor version for the OpenGL GraphicsContext.
flags GraphicsContextFlags The GraphicsContextFlags for the OpenGL GraphicsContext.
Résultat System

GetEglDisplay() public méthode

public GetEglDisplay ( ) : IntPtr
Résultat System.IntPtr

GetEglSurface() public méthode

public GetEglSurface ( ) : IntPtr
Résultat System.IntPtr

MakeCurrent() public méthode

Makes the underlying this GLControl current in the calling thread. All OpenGL commands issued are hereafter interpreted by this GLControl.
public MakeCurrent ( ) : void
Résultat void

OnHandleCreated() protected méthode

Raises the HandleCreated event.
protected OnHandleCreated ( EventArgs e ) : void
e System.EventArgs Not used.
Résultat void

OnHandleDestroyed() protected méthode

Raises the HandleDestroyed event.
protected OnHandleDestroyed ( EventArgs e ) : void
e System.EventArgs Not used.
Résultat void

OnPaint() protected méthode

Raises the System.Windows.Forms.Control.Paint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A System.Windows.Forms.PaintEventArgs that contains the event data.
Résultat void

OnParentChanged() protected méthode

Raises the ParentChanged event.
protected OnParentChanged ( EventArgs e ) : void
e System.EventArgs A System.EventArgs that contains the event data.
Résultat void

OnResize() protected méthode

Raises the Resize event. Note: this method may be called before the OpenGL context is ready. Check that IsHandleCreated is true before using any OpenGL methods.
protected OnResize ( EventArgs e ) : void
e System.EventArgs A System.EventArgs that contains the event data.
Résultat void

SwapBuffers() public méthode

Swaps the front and back buffers, presenting the rendered scene to the screen.
public SwapBuffers ( ) : void
Résultat void