Show / Hide Table of Contents

Class OpenGLPlatformInfo

Encapsulates various pieces of OpenGL context, necessary for creating a GraphicsDevice using the OpenGL API.

Inheritance
System.Object
OpenGLPlatformInfo
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Veldrid.OpenGL
Assembly: cs.temp.dll.dll
Syntax
public class OpenGLPlatformInfo

Constructors

OpenGLPlatformInfo(IntPtr, Func<String, IntPtr>, Action<IntPtr>, Func<IntPtr>, Action, Action<IntPtr>, Action, Action<Boolean>)

Constructs a new OpenGLPlatformInfo.

Declaration
public OpenGLPlatformInfo(IntPtr openGLContextHandle, Func<string, IntPtr> getProcAddress, Action<IntPtr> makeCurrent, Func<IntPtr> getCurrentContext, Action clearCurrentContext, Action<IntPtr> deleteContext, Action swapBuffers, Action<bool> setSyncToVerticalBlank)
Parameters
Type Name Description
System.IntPtr openGLContextHandle

The OpenGL context handle.

System.Func<System.String, System.IntPtr> getProcAddress

A delegate which can be used to retrieve OpenGL function pointers by name.

System.Action<System.IntPtr> makeCurrent

A delegate which can be used to make the given OpenGL context current on the calling thread.

System.Func<System.IntPtr> getCurrentContext

A delegate which can be used to retrieve the calling thread's active OpenGL context.

System.Action clearCurrentContext

A delegate which can be used to clear the calling thread's GL context.

System.Action<System.IntPtr> deleteContext

A delegate which can be used to delete the given context.

System.Action swapBuffers

A delegate which can be used to swap the main back buffer associated with the OpenGL context.

System.Action<System.Boolean> setSyncToVerticalBlank

A delegate which can be used to set the synchronization behavior of the OpenGL context.

OpenGLPlatformInfo(IntPtr, Func<String, IntPtr>, Action<IntPtr>, Func<IntPtr>, Action, Action<IntPtr>, Action, Action<Boolean>, Action, Action<UInt32, UInt32>)

Constructs a new OpenGLPlatformInfo.

Declaration
public OpenGLPlatformInfo(IntPtr openGLContextHandle, Func<string, IntPtr> getProcAddress, Action<IntPtr> makeCurrent, Func<IntPtr> getCurrentContext, Action clearCurrentContext, Action<IntPtr> deleteContext, Action swapBuffers, Action<bool> setSyncToVerticalBlank, Action setSwapchainFramebuffer, Action<uint, uint> resizeSwapchain)
Parameters
Type Name Description
System.IntPtr openGLContextHandle

The OpenGL context handle.

System.Func<System.String, System.IntPtr> getProcAddress

A delegate which can be used to retrieve OpenGL function pointers by name.

System.Action<System.IntPtr> makeCurrent

A delegate which can be used to make the given OpenGL context current on the calling thread.

System.Func<System.IntPtr> getCurrentContext

A delegate which can be used to retrieve the calling thread's active OpenGL context.

System.Action clearCurrentContext

A delegate which can be used to clear the calling thread's GL context.

System.Action<System.IntPtr> deleteContext

A delegate which can be used to delete the given context.

System.Action swapBuffers

A delegate which can be used to swap the main back buffer associated with the OpenGL context.

System.Action<System.Boolean> setSyncToVerticalBlank

A delegate which can be used to set the synchronization behavior of the OpenGL context.

System.Action setSwapchainFramebuffer

A delegate which can be used to set the framebuffer used to render to the application Swapchain.

System.Action<System.UInt32, System.UInt32> resizeSwapchain

A delegate which is invoked when the main Swapchain is resized. This may be null, in which case no special action is taken when the Swapchain is resized.

Properties

ClearCurrentContext

A delegate which can be used to clear the calling thread's GL context.

Declaration
public Action ClearCurrentContext { get; }
Property Value
Type Description
System.Action

DeleteContext

A delegate which can be used to delete the given context.

Declaration
public Action<IntPtr> DeleteContext { get; }
Property Value
Type Description
System.Action<System.IntPtr>

GetCurrentContext

A delegate which can be used to retrieve the calling thread's active OpenGL context.

Declaration
public Func<IntPtr> GetCurrentContext { get; }
Property Value
Type Description
System.Func<System.IntPtr>

GetProcAddress

A delegate which can be used to retrieve OpenGL function pointers by name.

Declaration
public Func<string, IntPtr> GetProcAddress { get; }
Property Value
Type Description
System.Func<System.String, System.IntPtr>

MakeCurrent

A delegate which can be used to make the given OpenGL context current on the calling thread.

Declaration
public Action<IntPtr> MakeCurrent { get; }
Property Value
Type Description
System.Action<System.IntPtr>

OpenGLContextHandle

The OpenGL context handle.

Declaration
public IntPtr OpenGLContextHandle { get; }
Property Value
Type Description
System.IntPtr

ResizeSwapchain

A delegate which is invoked when the main Swapchain is resized. This may be null, in which case no special action is taken when the Swapchain is resized.

Declaration
public Action<uint, uint> ResizeSwapchain { get; }
Property Value
Type Description
System.Action<System.UInt32, System.UInt32>

SetSwapchainFramebuffer

A delegate which can be used to set the framebuffer used to render to the application Swapchain. If this is null, the default FBO (0) will be bound.

Declaration
public Action SetSwapchainFramebuffer { get; }
Property Value
Type Description
System.Action

SetSyncToVerticalBlank

A delegate which can be used to set the synchronization behavior of the OpenGL context.

Declaration
public Action<bool> SetSyncToVerticalBlank { get; }
Property Value
Type Description
System.Action<System.Boolean>

SwapBuffers

A delegate which can be used to swap the main back buffer associated with the OpenGL context.

Declaration
public Action SwapBuffers { get; }
Property Value
Type Description
System.Action
Back to top