70 glClear(GL_COLOR_BUFFER_BIT);
79 glPixelTransferf(GL_RED_SCALE, 1.0
f);
int rs_get_device_count(const rs_context *context, rs_error **error)
Determines number of connected devices.
const void * rs_get_frame_data(const rs_device *device, rs_stream stream, rs_error **error)
Retrieves the contents of the latest frame on a stream.
const char * rs_get_device_name(const rs_device *device, rs_error **error)
Retrieves human-readable device model string.
const char * rs_get_error_message(const rs_error *error)
Returns static pointer to error message.
float rs_get_device_depth_scale(const rs_device *device, rs_error **error)
Retrieves mapping between the units of the depth image and meters.
Exposes librealsense functionality for C compilers.
struct GLFWwindow GLFWwindow
Opaque window object.
const char * rs_get_failed_function(const rs_error *error)
Returns static pointer to name of a failing function in case of error.
GLFWAPI int glfwInit(void)
Initializes the GLFW library.
rs_context * rs_create_context(int api_version, rs_error **error)
Creates RealSense context that is required for the rest of the API.
const char * rs_get_device_firmware_version(const rs_device *device, rs_error **error)
Retrieves the version of the firmware currently installed on the device.
GLFWAPI void glfwSwapBuffers(GLFWwindow *window)
Swaps the front and back buffers of the specified window.
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *window)
Makes the context of the specified window current for the calling thread.
void rs_enable_stream(rs_device *device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error **error)
Enables a specific stream and requests specific properties.
const char * rs_get_failed_args(const rs_error *error)
Returns static pointer to arguments of a failing function in case of error.
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
rs_device * rs_get_device(rs_context *context, int index, rs_error **error)
Retrieves connected device by index.
const char * rs_get_device_serial(const rs_device *device, rs_error **error)
Retrieves unique serial number of the device.
void rs_wait_for_frames(rs_device *device, rs_error **error)
Blocks until new frames are available.
GLFWAPI void glfwPollEvents(void)
Processes all pending events.
void rs_start_device(rs_device *device, rs_error **error)
Begins streaming on all enabled streams for this device.
int rs_is_stream_enabled(const rs_device *device, rs_stream stream, rs_error **error)
Determines if a specific stream is enabled.
GLFWAPI int glfwWindowShouldClose(GLFWwindow *window)
Checks the close flag of the specified window.