Show / Hide Table of Contents

Class Utilities

Provides cross-platform utilities to help interact with the underlying platform.

Inheritance
Object
Utilities
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: OpenTK.Platform
Assembly: OpenTK.dll
Syntax
public static class Utilities

Methods

CreateAngleWindowInfo(IWindowInfo)

Creates an IWindowInfo instance for Angle rendering, based on supplied platform window (e.g. a window created with CreateWindowsWindowInfo, or CreateDummyWindowInfo).

Declaration
public static IAngleWindowInfo CreateAngleWindowInfo(IWindowInfo platformWindow)
Parameters
Type Name Description
IWindowInfo platformWindow
Returns
Type Description
IAngleWindowInfo

CreateDummyWindowInfo()

Creates an IWindowInfo instance for the dummy platform.

Declaration
public static IWindowInfo CreateDummyWindowInfo()
Returns
Type Description
IWindowInfo

A new IWindowInfo instance.

CreateMacOSCarbonWindowInfo(IntPtr, Boolean, Boolean)

Creates an IWindowInfo instance for the Mac OS X platform.

Declaration
public static IWindowInfo CreateMacOSCarbonWindowInfo(IntPtr windowHandle, bool ownHandle, bool isControl)
Parameters
Type Name Description
IntPtr windowHandle

The handle of the window.

Boolean ownHandle

Ignored. This is reserved for future use.

Boolean isControl

Set to true if windowHandle corresponds to a System.Windows.Forms control.

Returns
Type Description
IWindowInfo

A new IWindowInfo instance.

CreateMacOSCarbonWindowInfo(IntPtr, Boolean, Boolean, GetInt, GetInt)

Creates an IWindowInfo instance for the Mac OS X platform with an X and Y offset for the GL viewport location.

Declaration
public static IWindowInfo CreateMacOSCarbonWindowInfo(IntPtr windowHandle, bool ownHandle, bool isControl, GetInt xOffset, GetInt yOffset)
Parameters
Type Name Description
IntPtr windowHandle

The handle of the window.

Boolean ownHandle

Ignored. This is reserved for future use.

Boolean isControl

Set to true if windowHandle corresponds to a System.Windows.Forms control.

GetInt xOffset

The X offset for the GL viewport

GetInt yOffset

The Y offset for the GL viewport

Returns
Type Description
IWindowInfo

A new IWindowInfo instance.

CreateMacOSWindowInfo(IntPtr)

Creates an IWindowInfo instance for the Mac OS X platform.

Declaration
public static IWindowInfo CreateMacOSWindowInfo(IntPtr windowHandle)
Parameters
Type Name Description
IntPtr windowHandle

The handle of the NSWindow.

Returns
Type Description
IWindowInfo

A new IWindowInfo instance.

Remarks

Assumes that the NSWindow's contentView is the NSView we want to attach to our context.

CreateMacOSWindowInfo(IntPtr, IntPtr)

Creates an IWindowInfo instance for the Mac OS X platform.

Declaration
public static IWindowInfo CreateMacOSWindowInfo(IntPtr windowHandle, IntPtr viewHandle)
Parameters
Type Name Description
IntPtr windowHandle

The handle of the NSWindow.

IntPtr viewHandle

The handle of the NSView.

Returns
Type Description
IWindowInfo

A new IWindowInfo instance.

CreateSdl2WindowInfo(IntPtr)

Creates an IWindowInfo instance for the windows platform.

Declaration
public static IWindowInfo CreateSdl2WindowInfo(IntPtr windowHandle)
Parameters
Type Name Description
IntPtr windowHandle

The handle of the window.

Returns
Type Description
IWindowInfo

A new IWindowInfo instance.

CreateWindowsWindowInfo(IntPtr)

Creates an IWindowInfo instance for the windows platform.

Declaration
public static IWindowInfo CreateWindowsWindowInfo(IntPtr windowHandle)
Parameters
Type Name Description
IntPtr windowHandle

The handle of the window.

Returns
Type Description
IWindowInfo

A new IWindowInfo instance.

CreateX11WindowInfo(IntPtr, Int32, IntPtr, IntPtr, IntPtr)

Constructs a new IWindowInfo instance for the X11 platform.

Declaration
public static IWindowInfo CreateX11WindowInfo(IntPtr display, int screen, IntPtr windowHandle, IntPtr rootWindow, IntPtr visualInfo)
Parameters
Type Name Description
IntPtr display

The display connection.

Int32 screen

The screen.

IntPtr windowHandle

The handle for the window.

IntPtr rootWindow

The root window for screen.

IntPtr visualInfo

A pointer to a XVisualInfo structure obtained through XGetVisualInfo.

Returns
Type Description
IWindowInfo

A new IWindowInfo instance.

In This Article
Back to top Generated by DocFX