Class context#
Defined in File context.h
Nested Relationships#
Nested Types#
Class Documentation#
-
class context#
Utility function that implements basic OpenGL context symbol resolvers.
These functions should be used only when the rendering context (the OpenGL window) isn’t managed by libf3d, but by the user directly. Therefore, the engine is created using
f3d::engine::createExternal
and the functions below can be used as argument of this factory. One can also create a custom functor returning af3d::context::function
.Public Static Functions
-
static function glx()#
Create a GLX context function. Only supported on Linux. Throw a loading_exception if it fails.
-
static function wgl()#
Create a WGL context function. Only supported on Windows. Throw a loading_exception if it fails.
-
static function cocoa()#
Create a COCOA context function. This is usually required when using a headless context and a GPU device. Only supported on macOS. Throw a loading_exception if it fails.
-
static function egl()#
Create a EGL context function. This is usually required when using a headless context and a GPU device. Only supported on Linux and Windows. Throw a loading_exception if it fails.
-
static function osmesa()#
Create a OSMesa context function. This is usually required when using a headless context and no GPU device. Only supported on Linux and Windows. Throw a loading_exception if it fails.
-
static function getSymbol(std::string_view lib, std::string_view func)#
Create a context function from a library name and a function name. The library name must be specified without its prefix and extension. For example,
getSymbol("EGL", "eglGetProcAddress")
looks for the symboleglGetProcAddress
in the librarylibEGL.so
on Linux. Throw a loading_exception if it fails to find the library or a symbol_exception if the lib does not contains the expected symbol.
-
static function glx()#