Class GLContext
- Namespace
- Gdk
- Assembly
- Gdk-4.0.dll
public class GLContext : DrawContext, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
GLContext
- Implements
- Derived
- Inherited Members
Constructors
GLContext(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public GLContext(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
GLContext(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected GLContext(CreationData data)
Parameters
dataCreationData
GLContext(GLContextHandle)
protected GLContext(GLContextHandle handle)
Parameters
handleGLContextHandle
Fields
AllowedApisPropertyDefinition
public static readonly Property<GLAPI, GLContext> AllowedApisPropertyDefinition
Field Value
ApiPropertyDefinition
public static readonly Property<GLAPI, GLContext> ApiPropertyDefinition
Field Value
SharedContextPropertyDefinition
public static readonly Property<GLContext?, GLContext> SharedContextPropertyDefinition
Field Value
Properties
AllowedApis
public GLAPI AllowedApis { get; set; }
Property Value
Api
public GLAPI Api { get; }
Property Value
SharedContext
public GLContext? SharedContext { get; }
Property Value
Methods
ClearCurrent()
public static void ClearCurrent()
GetAllowedApis()
[Version("4.6")]
public GLAPI GetAllowedApis()
Returns
GetApi()
[Version("4.6")]
public GLAPI GetApi()
Returns
GetCurrent()
public static GLContext? GetCurrent()
Returns
GetDebugEnabled()
public bool GetDebugEnabled()
Returns
GetDisplay()
public Display? GetDisplay()
Returns
GetForwardCompatible()
public bool GetForwardCompatible()
Returns
GetGType()
public static Type GetGType()
Returns
GetRequiredVersion(out int, out int)
public void GetRequiredVersion(out int major, out int minor)
Parameters
GetSharedContext()
public GLContext? GetSharedContext()
Returns
GetSurface()
public Surface? GetSurface()
Returns
GetUseEs()
public bool GetUseEs()
Returns
GetVersion(out int, out int)
public void GetVersion(out int major, out int minor)
Parameters
IsLegacy()
public bool IsLegacy()
Returns
IsShared(GLContext)
[Version("4.4")]
public bool IsShared(GLContext other)
Parameters
otherGLContext
Returns
MakeCurrent()
public void MakeCurrent()
NewFromPointer(nint, bool)
Creates a new managed GLContext instance for a given pointer.
public static GLContext NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new GLContext and sets the properties specified by the construct arguments.
public static GLContext NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
Realize()
public bool Realize()
Returns
SetAllowedApis(GLAPI)
[Version("4.6")]
public void SetAllowedApis(GLAPI apis)
Parameters
apisGLAPI
SetDebugEnabled(bool)
public void SetDebugEnabled(bool enabled)
Parameters
enabledbool
SetForwardCompatible(bool)
public void SetForwardCompatible(bool compatible)
Parameters
compatiblebool
SetRequiredVersion(int, int)
public void SetRequiredVersion(int major, int minor)
Parameters
SetUseEs(int)
public void SetUseEs(int useEs)
Parameters
useEsint