class
GLContextPlatform-specific OpenGL context.
Contents
In most cases not needed to be used directly as the initialization is done automatically in *Application
classes. See Platform support for more information.
Base classes
- class Magnum::GL::Context
- Magnum context.
Constructors, destructors, conversion operators
- GLContext(Int argc, const char** argv) explicit
- Constructor.
- GLContext(Int argc, char** argv) explicit
-
GLContext(Int argc,
std::
nullptr_t argv) explicit - GLContext() explicit
- Default constructor.
- GLContext(NoCreateT, Int argc, const char** argv) explicit
- Construct the class without doing complete setup.
- GLContext(NoCreateT, Int argc, char** argv) explicit
-
GLContext(NoCreateT,
Int argc,
std::
nullptr_t argv) explicit - GLContext(NoCreateT) explicit
- Construct the class without doing complete setup.
Public functions
Function documentation
Magnum:: Platform:: GLContext:: GLContext(Int argc,
const char** argv) explicit
Constructor.
Parses command-line arguments, loads OpenGL function pointers using platform-specific API, does initial setup, detects available features and enables them throughout the engine. If detected version is unsupported or any other error occurs, a message is printed to output and the application exits. See GLContext(NoCreateT, Int, char**) and tryCreate() for an alternative.
Magnum:: Platform:: GLContext:: GLContext(Int argc,
std:: nullptr_t argv) explicit
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Magnum:: Platform:: GLContext:: GLContext() explicit
Default constructor.
Equivalent to passing {0, nullptr}
to GLContext(Int, const char**). Even if the command-line options are not propagated, it's still possible to affect the renderer behavior from the environment. See Command-line options for more information.
Magnum:: Platform:: GLContext:: GLContext(NoCreateT,
Int argc,
const char** argv) explicit
Construct the class without doing complete setup.
Unlike GLContext(Int, char**) just parses command-line arguments and sets version() to GL::
Magnum:: Platform:: GLContext:: GLContext(NoCreateT,
Int argc,
std:: nullptr_t argv) explicit
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Magnum:: Platform:: GLContext:: GLContext(NoCreateT) explicit
Construct the class without doing complete setup.
Equivalent to passing {NoCreate, 0, nullptr}
to GLContext(NoCreateT, Int, const char**). Even if the command-line options are not propagated, it's still possible to affect the renderer behavior from the environment. See Command-line options for more information.
void Magnum:: Platform:: GLContext:: create()
Complete the context setup and exit on failure.
Finalizes the setup after the class was created using GLContext(NoCreateT, Int, char**). If detected version is unsupported or any other error occurs, a message is printed to error output and the application exits. See GLContext(Int, char**) for more information and tryCreate() for an alternative.