C# Class OpenTK.Platform.Utilities

Provides cross-platform utilities to help interact with the underlying platform.
Datei anzeigen Open project: andykorth/opentk Class Usage Examples

Private Properties

Property Type Description
CreateGraphicsContext IGraphicsContext
LoadExtensions void
TryLoadExtension bool

Public Methods

Method Description
CreateDummyWindowInfo ( ) : IWindowInfo

Creates an IWindowInfo instance for the dummy platform.

CreateMacOSCarbonWindowInfo ( IntPtr windowHandle, bool ownHandle, bool isControl ) : IWindowInfo

Creates an IWindowInfo instance for the Mac OS X platform.

CreateSdl2WindowInfo ( IntPtr windowHandle ) : IWindowInfo

Creates an IWindowInfo instance for the windows platform.

CreateWindowsWindowInfo ( IntPtr windowHandle ) : IWindowInfo

Creates an IWindowInfo instance for the windows platform.

CreateX11WindowInfo ( IntPtr display, int screen, IntPtr windowHandle, IntPtr rootWindow, IntPtr visualInfo ) : IWindowInfo

Constructs a new IWindowInfo instance for the X11 platform.

Private Methods

Method Description
CreateGraphicsContext ( OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, int major, int minor, GraphicsContextFlags flags ) : IGraphicsContext
LoadExtensions ( Type type ) : void

Loads all extensions for the specified class. This function is intended for OpenGL, Wgl, Glx, OpenAL etc.

The Type must contain a nested class called "Delegates".

The Type must also implement a static function called LoadDelegate with the following signature: static Delegate LoadDelegate(string name, Type signature)

This function allocates memory.

TryLoadExtension ( Type type, string extension ) : bool

Loads the specified extension for the specified class. This function is intended for OpenGL, Wgl, Glx, OpenAL etc.

The Type must contain a nested class called "Delegates".

The Type must also implement a static function called LoadDelegate with the following signature: static Delegate LoadDelegate(string name, Type signature)

This function allocates memory.

Method Details

CreateDummyWindowInfo() public static method

Creates an IWindowInfo instance for the dummy platform.
public static CreateDummyWindowInfo ( ) : IWindowInfo
return IWindowInfo

CreateMacOSCarbonWindowInfo() public static method

Creates an IWindowInfo instance for the Mac OS X platform.
public static CreateMacOSCarbonWindowInfo ( IntPtr windowHandle, bool ownHandle, bool isControl ) : IWindowInfo
windowHandle System.IntPtr The handle of the window.
ownHandle bool Ignored. This is reserved for future use.
isControl bool Set to true if windowHandle corresponds to a System.Windows.Forms control.
return IWindowInfo

CreateSdl2WindowInfo() public static method

Creates an IWindowInfo instance for the windows platform.
public static CreateSdl2WindowInfo ( IntPtr windowHandle ) : IWindowInfo
windowHandle System.IntPtr The handle of the window.
return IWindowInfo

CreateWindowsWindowInfo() public static method

Creates an IWindowInfo instance for the windows platform.
public static CreateWindowsWindowInfo ( IntPtr windowHandle ) : IWindowInfo
windowHandle System.IntPtr The handle of the window.
return IWindowInfo

CreateX11WindowInfo() public static method

Constructs a new IWindowInfo instance for the X11 platform.
public static CreateX11WindowInfo ( IntPtr display, int screen, IntPtr windowHandle, IntPtr rootWindow, IntPtr visualInfo ) : IWindowInfo
display System.IntPtr The display connection.
screen int The screen.
windowHandle System.IntPtr The handle for the window.
rootWindow System.IntPtr The root window for screen.
visualInfo System.IntPtr A pointer to a XVisualInfo structure obtained through XGetVisualInfo.
return IWindowInfo