Modules | Typedefs | Functions
Initialization, version and errors

Setup routines used to construct UVC access contexts. More...

Collaboration diagram for Initialization, version and errors:

Modules

 Error codes
 

Typedefs

typedef void(* GLFWerrorfun) (int, const char *)
 The function signature for error callbacks. More...
 

Functions

GLFWAPI void glfwGetVersion (int *major, int *minor, int *rev)
 Retrieves the version of the GLFW library. More...
 
GLFWAPI const char * glfwGetVersionString (void)
 Returns a string describing the compile-time configuration. More...
 
GLFWAPI int glfwInit (void)
 Initializes the GLFW library. More...
 
GLFWAPI GLFWerrorfun glfwSetErrorCallback (GLFWerrorfun cbfun)
 Sets the error callback. More...
 
GLFWAPI void glfwTerminate (void)
 Terminates the GLFW library. More...
 
void uvc_exit (uvc_context_t *ctx)
 Closes the UVC context, shutting down any active cameras. More...
 
uvc_error_t uvc_init (uvc_context_t **pctx, struct libusb_context *usb_ctx)
 Initializes the UVC context. More...
 

GLFW version macros

#define GLFW_VERSION_MAJOR   3
 The major version number of the GLFW library. More...
 
#define GLFW_VERSION_MINOR   1
 The minor version number of the GLFW library. More...
 
#define GLFW_VERSION_REVISION   2
 The revision number of the GLFW library. More...
 

Detailed Description

Setup routines used to construct UVC access contexts.

This is the reference documentation for initialization and termination of the library, version management and error handling. For more information, see the intro.

Macro Definition Documentation

#define GLFW_VERSION_MAJOR   3

The major version number of the GLFW library.

This is incremented when the API is changed in non-compatible ways.

Definition at line 200 of file glfw3.h.

#define GLFW_VERSION_MINOR   1

The minor version number of the GLFW library.

This is incremented when features are added to the API but it remains backward-compatible.

Definition at line 207 of file glfw3.h.

#define GLFW_VERSION_REVISION   2

The revision number of the GLFW library.

This is incremented when a bug fix release is made that does not contain any API changes.

Definition at line 214 of file glfw3.h.

Typedef Documentation

typedef void(* GLFWerrorfun) (int, const char *)

The function signature for error callbacks.

This is the function signature for error callback functions.

Parameters
[in]errorAn error code.
[in]descriptionA UTF-8 encoded string describing the error.
See also
glfwSetErrorCallback

Definition at line 743 of file glfw3.h.

Function Documentation

GLFWAPI void glfwGetVersion ( int major,
int minor,
int rev 
)

Retrieves the version of the GLFW library.

This function retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you are using GLFW as a shared library and want to ensure that you are using the minimum required version.

Any or all of the version arguments may be NULL. This function always succeeds.

Parameters
[out]majorWhere to store the major version number, or NULL.
[out]minorWhere to store the minor version number, or NULL.
[out]revWhere to store the revision number, or NULL.
Remarks
This function may be called before glfwInit.
Thread Safety
This function may be called from any thread.
See also
intro_version
glfwGetVersionString
Since
Added in GLFW 1.0.

Definition at line 172 of file examples/third_party/glfw/src/init.c.

GLFWAPI const char* glfwGetVersionString ( void  )

Returns a string describing the compile-time configuration.

This function returns the compile-time generated version string of the GLFW library binary. It describes the version, platform, compiler and any platform-specific compile-time options.

Do not use the version string to parse the GLFW library version. The glfwGetVersion function already provides the version of the running library binary.

This function always succeeds.

Returns
The GLFW version string.
Remarks
This function may be called before glfwInit.
Pointer Lifetime
The returned string is static and compile-time generated.
Thread Safety
This function may be called from any thread.
See also
intro_version
glfwGetVersion
Since
Added in GLFW 3.0.

Definition at line 184 of file examples/third_party/glfw/src/init.c.

GLFWAPI int glfwInit ( void  )

Initializes the GLFW library.

This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before an application terminates GLFW should be terminated in order to free any resources allocated during or after initialization.

If this function fails, it calls glfwTerminate before returning. If it succeeds, you should call glfwTerminate before the application exits.

Additional calls to this function after successful initialization but before termination will return GL_TRUE immediately.

Returns
GL_TRUE if successful, or GL_FALSE if an error occurred.
Remarks
OS X: This function will change the current directory of the application to the Contents/Resources subdirectory of the application's bundle, if present. This can be disabled with a compile-time option.
Thread Safety
This function may only be called from the main thread.
See also
intro_init
glfwTerminate
Since
Added in GLFW 1.0.

Definition at line 118 of file examples/third_party/glfw/src/init.c.

GLFWAPI GLFWerrorfun glfwSetErrorCallback ( GLFWerrorfun  cbfun)

Sets the error callback.

This function sets the error callback, which is called with an error code and a human-readable description each time a GLFW error occurs.

The error callback is called on the thread where the error occurred. If you are using GLFW from multiple threads, your error callback needs to be written accordingly.

Because the description string may have been generated specifically for that error, it is not guaranteed to be valid after the callback has returned. If you wish to use it after the callback returns, you need to make a copy.

Once set, the error callback remains set even after the library has been terminated.

Parameters
[in]cbfunThe new callback, or NULL to remove the currently set callback.
Returns
The previously set callback, or NULL if no callback was set.
Remarks
This function may be called before glfwInit.
Thread Safety
This function may only be called from the main thread.
See also
error_handling
Since
Added in GLFW 3.0.

Definition at line 189 of file examples/third_party/glfw/src/init.c.

GLFWAPI void glfwTerminate ( void  )

Terminates the GLFW library.

This function destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources. Once this function is called, you must again call glfwInit successfully before you will be able to use most GLFW functions.

If GLFW has been successfully initialized, this function should be called before the application exits. If initialization fails, there is no need to call this function, as it is called by glfwInit before it returns failure.

Remarks
This function may be called before glfwInit.
Warning
No window's context may be current on another thread when this function is called.
Reentrancy
This function may not be called from a callback.
Thread Safety
This function may only be called from the main thread.
See also
intro_init
glfwInit
Since
Added in GLFW 1.0.

Definition at line 140 of file examples/third_party/glfw/src/init.c.

void uvc_exit ( uvc_context_t ctx)

Closes the UVC context, shutting down any active cameras.

Note
This function invalides any existing references to the context's cameras.

If no USB context was provided to uvc_init, the UVC-specific USB context will be destroyed.

Parameters
ctxUVC context to shut down

Definition at line 142 of file src/libuvc/init.c.

uvc_error_t uvc_init ( uvc_context_t **  pctx,
struct libusb_context *  usb_ctx 
)

Initializes the UVC context.

Note
If you provide your own USB context, you must handle libusb event processing using a function such as libusb_handle_events.
Parameters
[out]pctxThe location where the context reference should be stored.
[in]usb_ctxOptional USB context to use
Returns
Error opening context or UVC_SUCCESS

Definition at line 108 of file src/libuvc/init.c.



librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:18