clan::OpenGLContextDescription Class Reference - ClanLib SDK
Description: clan::OpenGLContextDescription Class Reference

Public Member Functions | List of all members
clan::OpenGLContextDescription Class Reference
clanGL Display

OpenGL context specific settings. More...

`#include <opengl_context_description.h>`

## Public Member Functions
| OpenGLContextDescription ()
| Constructs a window description with default values.
virtual | ~OpenGLContextDescription ()
| Constructs a OpenGLContextDescription.
bool | get_allow_lower_versions () const
| Returns true if allowed lower versions than the selected version.
bool | get_compatibility_profile () const
| Returns true if the compatibility profile flag is set.
bool | get_core_profile () const
| Returns true if the core profile flag is set.
bool | get_debug () const
| Returns true if the debug flag is set.
bool | get_forward_compatible () const
| Returns true if the forward compatible flag is set.
int | get_layer_plane () const
| Returns the layer plane value.
int | get_version_major () const
| Returns selected major version number.
int | get_version_minor () const
| Returns selected minor version number.
void | set_compatibility_profile (bool enable)
| Sets the compatibility profile flag.
void | set_core_profile (bool enable)
| Sets the core profile flag.
void | set_debug (bool enable)
| Sets the debug flag.
void | set_forward_compatible (bool enable)
| Sets the forward compatible flag.
void | set_layer_plane (int value)
| Sets the layer plane value.
void | set_version (int major, int minor, bool allow_lower_versions)
| Select the OpenGL version number.

## Detailed Description

OpenGL context specific settings.

## Constructor & Destructor Documentation

## ◆ OpenGLContextDescription()

clan::OpenGLContextDescription::OpenGLContextDescription | ( |  | ) |

Constructs a window description with default values.

## ◆ ~OpenGLContextDescription()

virtual clan::OpenGLContextDescription::~OpenGLContextDescription | ( |  | ) |
| virtual

Constructs a OpenGLContextDescription.

Parameters

  desc | = Display Window Description

## Member Function Documentation

## ◆ get_allow_lower_versions()

bool clan::OpenGLContextDescription::get_allow_lower_versions | ( |  | ) | const

Returns true if allowed lower versions than the selected version.

## ◆ get_compatibility_profile()

bool clan::OpenGLContextDescription::get_compatibility_profile | ( |  | ) | const

Returns true if the compatibility profile flag is set.

## ◆ get_core_profile()

bool clan::OpenGLContextDescription::get_core_profile | ( |  | ) | const

Returns true if the core profile flag is set.

## ◆ get_debug()

bool clan::OpenGLContextDescription::get_debug | ( |  | ) | const

Returns true if the debug flag is set.

## ◆ get_forward_compatible()

bool clan::OpenGLContextDescription::get_forward_compatible | ( |  | ) | const

Returns true if the forward compatible flag is set.

## ◆ get_layer_plane()

int clan::OpenGLContextDescription::get_layer_plane | ( |  | ) | const

Returns the layer plane value.

## ◆ get_version_major()

int clan::OpenGLContextDescription::get_version_major | ( |  | ) | const

Returns selected major version number.

## ◆ get_version_minor()

int clan::OpenGLContextDescription::get_version_minor | ( |  | ) | const

Returns selected minor version number.

## ◆ set_compatibility_profile()

void clan::OpenGLContextDescription::set_compatibility_profile | ( | bool | enable | ) |

Sets the compatibility profile flag.

If than a context implementing the compatibility profile is returned.

Parameters

  enable | = true - Enable this option (Default is false)

## ◆ set_core_profile()

void clan::OpenGLContextDescription::set_core_profile | ( | bool | enable | ) |

Sets the core profile flag.

If true, then a context implementing the core profile of OpenGL is returned

Parameters

  enable | = true - Enable this option (Default is true)

## ◆ set_debug()

void clan::OpenGLContextDescription::set_debug | ( | bool | enable | ) |

Sets the debug flag.

Debug contexts are intended for use during application development, and provide additional runtime checking, validation, and logging functionality while possibly incurring performance penalties

Parameters

  enable | = true - Enable this option (Default is false)

## ◆ set_forward_compatible()

void clan::OpenGLContextDescription::set_forward_compatible | ( | bool | enable | ) |

Sets the forward compatible flag.

Forward-compatible contexts must not support functionality marked as deprecated by that version of the API, while a non-forward-compatible context must support all functionality in that version, deprecated or not.

Parameters

  enable | = true - Enable this option (Default is false)

## ◆ set_layer_plane()

void clan::OpenGLContextDescription::set_layer_plane | ( | int | value | ) |

Sets the layer plane value.

Specifies the layer plane that the rendering context is bound to

Parameters

  value | = The layer plane. (Default is 0 - the main plane)

## ◆ set_version()

void clan::OpenGLContextDescription::set_version | ( | int | major,
|  | int | minor,
|  | bool | allow_lower_versions )

Select the OpenGL version number.

Defaults to OpenGL 4.3 (will drop to Legacy OpenGL without shader support if lower)

Parameters

  major | = OpenGL major number (e.g. 4)
  minor | = OpenGL minor number (e.g. 3)
  allow_lower_versions | = Allow lower versions of the specified opengl (4.3 is minimum

The documentation for this class was generated from the following file:

- opengl_context_description.h