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
openGLContextHandlenintThe OpenGL context handle.
getProcAddressFunc<string, nint>A delegate which can be used to retrieve OpenGL function pointers by name.
makeCurrentAction<nint>A delegate which can be used to make the given OpenGL context current on the calling thread.
getCurrentContextFunc<nint>A delegate which can be used to retrieve the calling thread's active OpenGL context.
clearCurrentContextActionA delegate which can be used to clear the calling thread's GL context.
deleteContextAction<nint>A delegate which can be used to delete the given context.
swapBuffersActionA delegate which can be used to swap the main back buffer associated with the OpenGL context.
setSyncToVerticalBlankAction<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
openGLContextHandlenintThe OpenGL context handle.
getProcAddressFunc<string, nint>A delegate which can be used to retrieve OpenGL function pointers by name.
makeCurrentAction<nint>A delegate which can be used to make the given OpenGL context current on the calling thread.
getCurrentContextFunc<nint>A delegate which can be used to retrieve the calling thread's active OpenGL context.
clearCurrentContextActionA delegate which can be used to clear the calling thread's GL context.
deleteContextAction<nint>A delegate which can be used to delete the given context.
swapBuffersActionA delegate which can be used to swap the main back buffer associated with the OpenGL context.
setSyncToVerticalBlankAction<bool>A delegate which can be used to set the synchronization behavior of the OpenGL context.
setSwapchainFramebufferActionA delegate which can be used to set the framebuffer used to render to the application Swapchain.
resizeSwapchainAction<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
DeleteContext
A delegate which can be used to delete the given context.
public Action<nint> DeleteContext { get; }
Property Value
GetCurrentContext
A delegate which can be used to retrieve the calling thread's active OpenGL context.
public Func<nint> GetCurrentContext { get; }
Property Value
GetProcAddress
A delegate which can be used to retrieve OpenGL function pointers by name.
public Func<string, nint> GetProcAddress { get; }
Property Value
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
OpenGLContextHandle
The OpenGL context handle.
public nint OpenGLContextHandle { get; }
Property Value
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
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
SetSyncToVerticalBlank
A delegate which can be used to set the synchronization behavior of the OpenGL context.
public Action<bool> SetSyncToVerticalBlank { get; }
Property Value
SwapBuffers
A delegate which can be used to swap the main back buffer associated with the OpenGL context.
public Action SwapBuffers { get; }