Table of Contents

Class OpenGLPlatformInfo

Namespace
NeoVeldrid.OpenGL
Assembly
NeoVeldrid.dll

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

public class OpenGLPlatformInfo
Inheritance
OpenGLPlatformInfo
Inherited Members

Constructors

OpenGLPlatformInfo(nint, Func<string, nint>, Action<nint>, Func<nint>, Action, Action<nint>, Action, Action<bool>)

Constructs a new OpenGLPlatformInfo.

public OpenGLPlatformInfo(nint openGLContextHandle, Func<string, nint> getProcAddress, Action<nint> makeCurrent, Func<nint> getCurrentContext, Action clearCurrentContext, Action<nint> deleteContext, Action swapBuffers, Action<bool> setSyncToVerticalBlank)

Parameters

openGLContextHandle nint

The OpenGL context handle.

getProcAddress Func<string, nint>

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

makeCurrent Action<nint>

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

getCurrentContext Func<nint>

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

clearCurrentContext Action

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

deleteContext Action<nint>

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

swapBuffers Action

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

setSyncToVerticalBlank Action<bool>

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

OpenGLPlatformInfo(nint, Func<string, nint>, Action<nint>, Func<nint>, Action, Action<nint>, Action, Action<bool>, Action, Action<uint, uint>)

Constructs a new OpenGLPlatformInfo.

public OpenGLPlatformInfo(nint openGLContextHandle, Func<string, nint> getProcAddress, Action<nint> makeCurrent, Func<nint> getCurrentContext, Action clearCurrentContext, Action<nint> deleteContext, Action swapBuffers, Action<bool> setSyncToVerticalBlank, Action setSwapchainFramebuffer, Action<uint, uint> resizeSwapchain)

Parameters

openGLContextHandle nint

The OpenGL context handle.

getProcAddress Func<string, nint>

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

makeCurrent Action<nint>

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

getCurrentContext Func<nint>

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

clearCurrentContext Action

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

deleteContext Action<nint>

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

swapBuffers Action

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

setSyncToVerticalBlank Action<bool>

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

setSwapchainFramebuffer Action

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

resizeSwapchain Action<uint, uint>

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.

public Action ClearCurrentContext { get; }

Property Value

Action

DeleteContext

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

public Action<nint> DeleteContext { get; }

Property Value

Action<nint>

GetCurrentContext

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

public Func<nint> GetCurrentContext { get; }

Property Value

Func<nint>

GetProcAddress

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

public Func<string, nint> GetProcAddress { get; }

Property Value

Func<string, nint>

MakeCurrent

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

public Action<nint> MakeCurrent { get; }

Property Value

Action<nint>

OpenGLContextHandle

The OpenGL context handle.

public nint OpenGLContextHandle { get; }

Property Value

nint

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.

public Action<uint, uint> ResizeSwapchain { get; }

Property Value

Action<uint, uint>

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.

public Action SetSwapchainFramebuffer { get; }

Property Value

Action

SetSyncToVerticalBlank

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

public Action<bool> SetSyncToVerticalBlank { get; }

Property Value

Action<bool>

SwapBuffers

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

public Action SwapBuffers { get; }

Property Value

Action