Class GraphicsMode
Defines the format for graphics operations.
Implements
Inherited Members
Namespace: OpenTK.Graphics
Assembly: OpenTK.dll
Syntax
public class GraphicsMode : IEquatable<GraphicsMode>
Constructors
GraphicsMode()
Constructs a new GraphicsMode with sensible default parameters.
Declaration
public GraphicsMode()
GraphicsMode(ColorFormat)
Constructs a new GraphicsMode with the specified parameters.
Declaration
public GraphicsMode(ColorFormat color)
Parameters
Type | Name | Description |
---|---|---|
ColorFormat | color | The ColorFormat of the color buffer. |
GraphicsMode(ColorFormat, Int32)
Constructs a new GraphicsMode with the specified parameters.
Declaration
public GraphicsMode(ColorFormat color, int depth)
Parameters
Type | Name | Description |
---|---|---|
ColorFormat | color | The ColorFormat of the color buffer. |
Int32 | depth | The number of bits in the depth buffer. |
GraphicsMode(ColorFormat, Int32, Int32)
Constructs a new GraphicsMode with the specified parameters.
Declaration
public GraphicsMode(ColorFormat color, int depth, int stencil)
Parameters
Type | Name | Description |
---|---|---|
ColorFormat | color | The ColorFormat of the color buffer. |
Int32 | depth | The number of bits in the depth buffer. |
Int32 | stencil | The number of bits in the stencil buffer. |
GraphicsMode(ColorFormat, Int32, Int32, Int32)
Constructs a new GraphicsMode with the specified parameters.
Declaration
public GraphicsMode(ColorFormat color, int depth, int stencil, int samples)
Parameters
Type | Name | Description |
---|---|---|
ColorFormat | color | The ColorFormat of the color buffer. |
Int32 | depth | The number of bits in the depth buffer. |
Int32 | stencil | The number of bits in the stencil buffer. |
Int32 | samples | The number of samples for FSAA. |
GraphicsMode(ColorFormat, Int32, Int32, Int32, ColorFormat)
Constructs a new GraphicsMode with the specified parameters.
Declaration
public GraphicsMode(ColorFormat color, int depth, int stencil, int samples, ColorFormat accum)
Parameters
Type | Name | Description |
---|---|---|
ColorFormat | color | The ColorFormat of the color buffer. |
Int32 | depth | The number of bits in the depth buffer. |
Int32 | stencil | The number of bits in the stencil buffer. |
Int32 | samples | The number of samples for FSAA. |
ColorFormat | accum | The ColorFormat of the accumilliary buffer. |
GraphicsMode(ColorFormat, Int32, Int32, Int32, ColorFormat, Int32)
Constructs a new GraphicsMode with the specified parameters.
Declaration
public GraphicsMode(ColorFormat color, int depth, int stencil, int samples, ColorFormat accum, int buffers)
Parameters
Type | Name | Description |
---|---|---|
ColorFormat | color | The ColorFormat of the color buffer. |
Int32 | depth | The number of bits in the depth buffer. |
Int32 | stencil | The number of bits in the stencil buffer. |
Int32 | samples | The number of samples for FSAA. |
ColorFormat | accum | The ColorFormat of the accumilliary buffer. |
Int32 | buffers | The number of render buffers. Typical values include one (single-), two (double-) or three (triple-buffering). |
GraphicsMode(ColorFormat, Int32, Int32, Int32, ColorFormat, Int32, Boolean)
Constructs a new GraphicsMode with the specified parameters.
Declaration
public GraphicsMode(ColorFormat color, int depth, int stencil, int samples, ColorFormat accum, int buffers, bool stereo)
Parameters
Type | Name | Description |
---|---|---|
ColorFormat | color | The ColorFormat of the color buffer. |
Int32 | depth | The number of bits in the depth buffer. |
Int32 | stencil | The number of bits in the stencil buffer. |
Int32 | samples | The number of samples for FSAA. |
ColorFormat | accum | The ColorFormat of the accumilliary buffer. |
Int32 | buffers | The number of render buffers. Typical values include one (single-), two (double-) or three (triple-buffering). |
Boolean | stereo | Set to true for a GraphicsMode with stereographic capabilities. |
Properties
AccumulatorFormat
Gets an OpenTK.Graphics.ColorFormat that describes the accumulator format for this GraphicsFormat.
Declaration
public ColorFormat AccumulatorFormat { get; }
Property Value
Type | Description |
---|---|
ColorFormat |
Buffers
Gets a System.Int32 containing the number of buffers associated with this DisplayMode.
Declaration
public int Buffers { get; }
Property Value
Type | Description |
---|---|
Int32 |
ColorFormat
Gets an OpenTK.Graphics.ColorFormat that describes the color format for this GraphicsFormat.
Declaration
public ColorFormat ColorFormat { get; }
Property Value
Type | Description |
---|---|
ColorFormat |
Default
Returns an OpenTK.GraphicsFormat compatible with the underlying platform.
Declaration
public static GraphicsMode Default { get; }
Property Value
Type | Description |
---|---|
GraphicsMode |
Depth
Gets a System.Int32 that contains the bits per pixel for the depth buffer for this GraphicsFormat.
Declaration
public int Depth { get; }
Property Value
Type | Description |
---|---|
Int32 |
Index
Gets a nullable IntPtr value, indicating the platform-specific index for this GraphicsMode.
Declaration
public IntPtr? Index { get; set; }
Property Value
Type | Description |
---|---|
Nullable<IntPtr> |
Samples
Gets a System.Int32 that contains the number of FSAA samples per pixel for this GraphicsFormat.
Declaration
public int Samples { get; }
Property Value
Type | Description |
---|---|
Int32 |
Stencil
Gets a System.Int32 that contains the bits per pixel for the stencil buffer of this GraphicsFormat.
Declaration
public int Stencil { get; }
Property Value
Type | Description |
---|---|
Int32 |
Stereo
Gets a System.Boolean indicating whether this DisplayMode is stereoscopic.
Declaration
public bool Stereo { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Equals(GraphicsMode)
Indicates whether other represents the same mode as this instance.
Declaration
public bool Equals(GraphicsMode other)
Parameters
Type | Name | Description |
---|---|---|
GraphicsMode | other | The GraphicsMode to compare to. |
Returns
Type | Description |
---|---|
Boolean | True, if other is equal to this instance; false otherwise. |
Equals(Object)
Indicates whether obj is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | An object instance to compare for equality. |
Returns
Type | Description |
---|---|
Boolean | True, if obj equals this instance; false otherwise. |
Overrides
GetHashCode()
Returns the hashcode for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A Int32 hashcode for this instance. |
Overrides
ToString()
Returns a System.String describing the current GraphicsFormat.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | ! System.String describing the current GraphicsFormat. |