Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Loading...
Searching...
No Matches
rs_processing_gl.h
Go to the documentation of this file.
1/* License: Apache 2.0. See LICENSE file in root directory.
2 Copyright(c) 2017 Intel Corporation. All Rights Reserved. */
3
8
9#ifndef LIBREALSENSE_RS2_PROCESSING_GL_H
10#define LIBREALSENSE_RS2_PROCESSING_GL_H
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include "librealsense2/rs.h"
17
18/*
19* GL-specific extension types.
20* Used similar to regular RS extensions
21*/
28
29/*
30* In addition to "options", GL processing blocks
31* expose new type of multidementional options each holding a 4x4 matrix
32*/
41
42/* Forward-declare GLFW types */
43typedef struct GLFWwindow GLFWwindow;
44typedef struct GLFWmonitor GLFWmonitor;
45typedef int(*glfwInitFun)(void);
46typedef void(*glfwWindowHintFun)(int, int);
47typedef GLFWwindow*(*glfwCreateWindowFun)(int, int, const char*, GLFWmonitor*, GLFWwindow*);
50typedef GLFWwindow*(*glfwGetCurrentContextFun)(void);
51typedef void(*glfwSwapIntervalFun)(int);
52typedef void(*GLFWglproc)(void);
53typedef GLFWglproc(*glfwGetProcAddressFun)(const char*);
54
55/* To avoid GLFW version mismatch (mainly can affect Windows), the application passes pointers
56* to its version of GLFW, via glfw_bindings struct
57*/
69
77
88
96void rs2_gl_set_matrix(rs2_processing_block* block, rs2_gl_matrix_type type, float* m4x4, rs2_error** error);
97
106
116unsigned int rs2_gl_frame_get_texture_id(const rs2_frame* f, unsigned int id, rs2_error** error);
117
125
133
141
151
161
170
184void rs2_gl_init_rendering(int api_version, int use_glsl, rs2_error** error);
185
195void rs2_gl_init_rendering_glfw(int api_version, glfw_binding bindings, int use_glsl, rs2_error** error);
196
205void rs2_gl_init_processing(int api_version, int use_glsl, rs2_error** error);
206
217void rs2_gl_init_processing_glfw(int api_version, GLFWwindow* share_with,
218 glfw_binding bindings, int use_glsl, rs2_error** error);
219
225void rs2_gl_shutdown_rendering(int api_version, rs2_error** error);
226
232void rs2_gl_shutdown_processing(int api_version, rs2_error** error);
233
234#ifdef __cplusplus
235}
236#endif
237#endif
Exposes librealsense functionality for C compilers.
rs2_processing_block * rs2_gl_create_colorizer(int api_version, rs2_error **error)
const char * rs2_gl_extension_to_string(rs2_extension type)
unsigned int rs2_gl_frame_get_texture_id(const rs2_frame *f, unsigned int id, rs2_error **error)
rs2_gl_extension
Definition rs_processing_gl.h:23
@ RS2_GL_EXTENSION_VIDEO_FRAME
Definition rs_processing_gl.h:24
@ RS2_GL_EXTENSION_COUNT
Definition rs_processing_gl.h:25
int(* glfwInitFun)(void)
Definition rs_processing_gl.h:45
rs2_processing_block * rs2_gl_create_pointcloud(int api_version, rs2_error **error)
struct GLFWwindow GLFWwindow
Definition rs_processing_gl.h:43
void(* GLFWglproc)(void)
Definition rs_processing_gl.h:52
void rs2_gl_init_rendering(int api_version, int use_glsl, rs2_error **error)
void(* glfwWindowHintFun)(int, int)
Definition rs_processing_gl.h:46
GLFWwindow *(* glfwCreateWindowFun)(int, int, const char *, GLFWmonitor *, GLFWwindow *)
Definition rs_processing_gl.h:47
void(* glfwSwapIntervalFun)(int)
Definition rs_processing_gl.h:51
struct GLFWmonitor GLFWmonitor
Definition rs_processing_gl.h:44
void(* glfwMakeContextCurrentFun)(GLFWwindow *)
Definition rs_processing_gl.h:49
rs2_processing_block * rs2_gl_create_yuy_decoder(int api_version, rs2_error **error)
rs2_processing_block * rs2_gl_create_align(int api_version, rs2_stream to, rs2_error **error)
void(* glfwDestroyWindowFun)(GLFWwindow *)
Definition rs_processing_gl.h:48
void rs2_gl_set_matrix(rs2_processing_block *block, rs2_gl_matrix_type type, float *m4x4, rs2_error **error)
rs2_processing_block * rs2_gl_create_camera_renderer(int api_version, rs2_error **error)
const char * rs2_gl_matrix_type_to_string(rs2_gl_matrix_type type)
void rs2_gl_shutdown_rendering(int api_version, rs2_error **error)
void rs2_gl_shutdown_processing(int api_version, rs2_error **error)
rs2_gl_matrix_type
Definition rs_processing_gl.h:34
@ RS2_GL_MATRIX_COUNT
Definition rs_processing_gl.h:38
@ RS2_GL_MATRIX_PROJECTION
Definition rs_processing_gl.h:36
@ RS2_GL_MATRIX_CAMERA
Definition rs_processing_gl.h:37
@ RS2_GL_MATRIX_TRANSFORMATION
Definition rs_processing_gl.h:35
GLFWglproc(* glfwGetProcAddressFun)(const char *)
Definition rs_processing_gl.h:53
GLFWwindow *(* glfwGetCurrentContextFun)(void)
Definition rs_processing_gl.h:50
int rs2_gl_is_frame_extendable_to(const rs2_frame *f, rs2_gl_extension extension_type, rs2_error **error)
rs2_processing_block * rs2_gl_create_uploader(int api_version, rs2_error **error)
rs2_processing_block * rs2_gl_create_y411_decoder(int api_version, rs2_error **error)
void rs2_gl_init_rendering_glfw(int api_version, glfw_binding bindings, int use_glsl, rs2_error **error)
void rs2_gl_init_processing(int api_version, int use_glsl, rs2_error **error)
void rs2_gl_init_processing_glfw(int api_version, GLFWwindow *share_with, glfw_binding bindings, int use_glsl, rs2_error **error)
rs2_processing_block * rs2_gl_create_pointcloud_renderer(int api_version, rs2_error **error)
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition rs_sensor.h:44
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition rs_types.h:137
struct rs2_error rs2_error
Definition rs_types.h:230
struct rs2_frame rs2_frame
Definition rs_types.h:233
struct rs2_processing_block rs2_processing_block
Definition rs_types.h:247
Definition rs_processing_gl.h:59
glfwDestroyWindowFun glfwDestroyWindow
Definition rs_processing_gl.h:63
glfwCreateWindowFun glfwCreateWindow
Definition rs_processing_gl.h:62
glfwWindowHintFun glfwWindowHint
Definition rs_processing_gl.h:61
glfwInitFun glfwInit
Definition rs_processing_gl.h:60
glfwGetCurrentContextFun glfwGetCurrentContext
Definition rs_processing_gl.h:65
glfwMakeContextCurrentFun glfwMakeContextCurrent
Definition rs_processing_gl.h:64
glfwGetProcAddressFun glfwGetProcAddress
Definition rs_processing_gl.h:67
glfwSwapIntervalFun glfwSwapInterval
Definition rs_processing_gl.h:66