C# Класс 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.
Наследование: System.Windows.Forms.UserControl
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GLControl System
GrabScreenshot System.Drawing.Bitmap
InitializeComponent void
ValidateState void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

ChildCtorOnlyResetGraphicMode() защищенный Метод

protected ChildCtorOnlyResetGraphicMode ( OpenTK.Graphics.GraphicsMode mode ) : void
mode OpenTK.Graphics.GraphicsMode
Результат void

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

GLControl() публичный Метод

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.
Результат System

GLControl() публичный Метод

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.
Результат System

GetEglDisplay() публичный Метод

public GetEglDisplay ( ) : IntPtr
Результат System.IntPtr

GetEglSurface() публичный Метод

public GetEglSurface ( ) : IntPtr
Результат System.IntPtr

MakeCurrent() публичный Метод

Makes the underlying this GLControl current in the calling thread. All OpenGL commands issued are hereafter interpreted by this GLControl.
public MakeCurrent ( ) : void
Результат void

OnHandleCreated() защищенный Метод

Raises the HandleCreated event.
protected OnHandleCreated ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnHandleDestroyed() защищенный Метод

Raises the HandleDestroyed event.
protected OnHandleDestroyed ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnPaint() защищенный Метод

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.
Результат void

OnParentChanged() защищенный Метод

Raises the ParentChanged event.
protected OnParentChanged ( EventArgs e ) : void
e System.EventArgs A System.EventArgs that contains the event data.
Результат void

OnResize() защищенный Метод

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.
Результат void

SwapBuffers() публичный Метод

Swaps the front and back buffers, presenting the rendered scene to the screen.
public SwapBuffers ( ) : void
Результат void