Skip to content

Commit

Permalink
context: Improve doc (#1842)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal authored Dec 28, 2024
1 parent df562fe commit 46d2a66
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions library/public/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,38 @@ class F3D_EXPORT context
/**
* Create a GLX context function.
* Only supported on Linux.
* Throw a loading_exception if it fails.
*/
[[nodiscard]] static function glx();

/**
* Create a WGL context function.
* Only supported on Windows.
* Throw a loading_exception if it fails.
*/
[[nodiscard]] static function wgl();

/**
* 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.
*/
[[nodiscard]] static function cocoa();

/**
* 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.
*/
[[nodiscard]] static function egl();

/**
* 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.
*/
[[nodiscard]] static function osmesa();

Expand All @@ -63,6 +68,8 @@ class F3D_EXPORT context
* The library name must be specified without its prefix and extension.
* For example, `getSymbol("EGL", "eglGetProcAddress")` looks for the symbol
* `eglGetProcAddress` in the library `libEGL.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.
*/
[[nodiscard]] static function getSymbol(std::string_view lib, std::string_view func);

Expand Down

0 comments on commit 46d2a66

Please sign in to comment.