Class OpenGLGraphicsApiHints
Graphics API hints for OpenGL family of APIs.
Inherited Members
Namespace: OpenTK.Core.Platform
Assembly: OpenTK.Core.dll
Syntax
public class OpenGLGraphicsApiHints : GraphicsApiHints
Constructors
OpenGLGraphicsApiHints()
Initializes a new instance of the OpenGLGraphicsApiHints class.
Declaration
public OpenGLGraphicsApiHints()
Properties
AlphaColorBits
Number of bits for alpha color channel.
Declaration
public int AlphaColorBits { get; set; }
Property Value
Type | Description |
---|---|
int |
Api
Which graphics API the hints are for.
Declaration
public override GraphicsApi Api { get; }
Property Value
Type | Description |
---|---|
GraphicsApi |
Overrides
BlueColorBits
Number of bits for blue color channel.
Declaration
public int BlueColorBits { get; set; }
Property Value
Type | Description |
---|---|
int |
DebugFlag
If the debug flag should be set or not.
Declaration
public bool DebugFlag { get; set; }
Property Value
Type | Description |
---|---|
bool |
DepthBits
Number of bits for depth buffer.
Declaration
public ContextDepthBits DepthBits { get; set; }
Property Value
Type | Description |
---|---|
ContextDepthBits |
DoubleBuffer
Enable double buffering.
Declaration
public bool DoubleBuffer { get; set; }
Property Value
Type | Description |
---|---|
bool |
ForwardCompatibleFlag
If the forward compatible flag should be set or not.
Declaration
public bool ForwardCompatibleFlag { get; set; }
Property Value
Type | Description |
---|---|
bool |
GreenColorBits
Number of bits for green color channel.
Declaration
public int GreenColorBits { get; set; }
Property Value
Type | Description |
---|---|
int |
Multisamples
Number of MSAA samples.
Declaration
public int Multisamples { get; set; }
Property Value
Type | Description |
---|---|
int |
NoError
If the "no error" flag should be set or not. See KHR_no_error. Cannot be enabled while DebugFlag or RobustnessFlag is set.
Declaration
public bool NoError { get; set; }
Property Value
Type | Description |
---|---|
bool |
PixelFormat
The pixel format of the context. This differentiates between "normal" fixed point LDR formats and floating point HDR formats. Use RGBAFloat or RGBAPackedFloat for HDR support. Is RGBA by default.
Declaration
public ContextPixelFormat PixelFormat { get; set; }
Property Value
Type | Description |
---|---|
ContextPixelFormat |
Profile
The OpenGL profile to request.
Declaration
public OpenGLProfile Profile { get; set; }
Property Value
Type | Description |
---|---|
OpenGLProfile |
RedColorBits
Number of bits for red color channel.
Declaration
public int RedColorBits { get; set; }
Property Value
Type | Description |
---|---|
int |
ReleaseBehaviour
If UseFlushControl is true then this controls the context release behaviour when the context is changed. Is Flush by default.
Declaration
public ContextReleaseBehaviour ReleaseBehaviour { get; set; }
Property Value
Type | Description |
---|---|
ContextReleaseBehaviour |
ResetIsolation
See GL_ARB_robustness_isolation. ResetNotificationStrategy needs to be LoseContextOnReset.
Declaration
public bool ResetIsolation { get; set; }
Property Value
Type | Description |
---|---|
bool |
ResetNotificationStrategy
The reset notification strategy to use if RobustnessFlag is set to true
.
See GL_ARB_robustness for details.
Default value is NoResetNotification.
Declaration
public ContextResetNotificationStrategy ResetNotificationStrategy { get; set; }
Property Value
Type | Description |
---|---|
ContextResetNotificationStrategy |
RobustnessFlag
If the robustness flag should be set or not.
Declaration
public bool RobustnessFlag { get; set; }
Property Value
Type | Description |
---|---|
bool |
Selector
A callback that can be used to select appropriate backbuffer values.
Declaration
public ContextValueSelector Selector { get; set; }
Property Value
Type | Description |
---|---|
ContextValueSelector |
SharedContext
A context to enable context sharing with.
Declaration
public OpenGLContextHandle? SharedContext { get; set; }
Property Value
Type | Description |
---|---|
OpenGLContextHandle |
StencilBits
Number of bits for stencil buffer.
Declaration
public ContextStencilBits StencilBits { get; set; }
Property Value
Type | Description |
---|---|
ContextStencilBits |
SwapMethod
The swap method to use for the context. Is Undefined by default.
Declaration
public ContextSwapMethod SwapMethod { get; set; }
Property Value
Type | Description |
---|---|
ContextSwapMethod |
UseFlushControl
Whether to use KHR_context_flush_control (if available) or not. See ReleaseBehaviour for flush control options.
Declaration
public bool UseFlushControl { get; set; }
Property Value
Type | Description |
---|---|
bool |
UseSelectorOnMacOS
Enumerating ContextValues on macOS is slow, so by default Selector is not used on macOS.
When this property is false
the default platform selection of context values are used, which tries to find a closest match.
Declaration
public bool UseSelectorOnMacOS { get; set; }
Property Value
Type | Description |
---|---|
bool |
Version
OpenGL version to create.
Declaration
public Version Version { get; set; }
Property Value
Type | Description |
---|---|
Version |
sRGBFramebuffer
Makes the backbuffer support sRGB.
Declaration
public bool sRGBFramebuffer { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Copy()
Make a memberwise copy of these settings.
Declaration
public OpenGLGraphicsApiHints Copy()
Returns
Type | Description |
---|---|
OpenGLGraphicsApiHints | The copied settings. |