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 
9 #ifndef LIBREALSENSE_RS2_PROCESSING_GL_H
10 #define LIBREALSENSE_RS2_PROCESSING_GL_H
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include "librealsense2/rs.h"
17 
18 /*
19 * GL-specific extension types.
20 * Used similar to regular RS extensions
21 */
22 typedef enum rs2_gl_extension
23 {
28 
29 /*
30 * In addition to "options", GL processing blocks
31 * expose new type of multidementional options each holding a 4x4 matrix
32 */
33 typedef enum rs2_gl_matrix_type
34 {
40 const char* rs2_gl_matrix_type_to_string(rs2_gl_matrix_type type);
41 
42 /* Forward-declare GLFW types */
43 typedef struct GLFWwindow GLFWwindow;
44 typedef struct GLFWmonitor GLFWmonitor;
45 typedef int(*glfwInitFun)(void);
46 typedef void(*glfwWindowHintFun)(int, int);
47 typedef GLFWwindow*(*glfwCreateWindowFun)(int, int, const char*, GLFWmonitor*, GLFWwindow*);
50 typedef GLFWwindow*(*glfwGetCurrentContextFun)(void);
51 typedef void(*glfwSwapIntervalFun)(int);
52 typedef void(*GLFWglproc)(void);
53 typedef 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 */
59 {
68 };
69 
77 
85 void rs2_gl_set_matrix(rs2_processing_block* block, rs2_gl_matrix_type type, float* m4x4, rs2_error** error);
86 
94 int rs2_gl_is_frame_extendable_to(const rs2_frame* f, rs2_gl_extension extension_type, rs2_error** error);
95 
105 unsigned int rs2_gl_frame_get_texture_id(const rs2_frame* f, unsigned int id, rs2_error** error);
106 
114 
122 
130 
140 
150 
159 
173 void rs2_gl_init_rendering(int api_version, int use_glsl, rs2_error** error);
174 
184 void rs2_gl_init_rendering_glfw(int api_version, glfw_binding bindings, int use_glsl, rs2_error** error);
185 
194 void rs2_gl_init_processing(int api_version, int use_glsl, rs2_error** error);
195 
206 void rs2_gl_init_processing_glfw(int api_version, GLFWwindow* share_with,
207  glfw_binding bindings, int use_glsl, rs2_error** error);
208 
214 void rs2_gl_shutdown_rendering(int api_version, rs2_error** error);
215 
221 void rs2_gl_shutdown_processing(int api_version, rs2_error** error);
222 
223 #ifdef __cplusplus
224 }
225 #endif
226 #endif
rs2_processing_block * rs2_gl_create_colorizer(int api_version, rs2_error **error)
void rs2_gl_shutdown_processing(int api_version, rs2_error **error)
glfwCreateWindowFun glfwCreateWindow
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
glfwMakeContextCurrentFun glfwMakeContextCurrent
glfwDestroyWindowFun glfwDestroyWindow
glfwGetProcAddressFun glfwGetProcAddress
void rs2_gl_init_rendering_glfw(int api_version, glfw_binding bindings, int use_glsl, rs2_error **error)
rs2_processing_block * rs2_gl_create_pointcloud_renderer(int api_version, rs2_error **error)
struct GLFWmonitor GLFWmonitor
void rs2_gl_shutdown_rendering(int api_version, rs2_error **error)
const char * rs2_gl_matrix_type_to_string(rs2_gl_matrix_type type)
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_yuy_decoder(int api_version, rs2_error **error)
Exposes librealsense functionality for C compilers.
glfwInitFun glfwInit
void(* GLFWglproc)(void)
GLdouble f
void rs2_gl_set_matrix(rs2_processing_block *block, rs2_gl_matrix_type type, float *m4x4, rs2_error **error)
GLFWglproc(* glfwGetProcAddressFun)(const char *)
void(* glfwMakeContextCurrentFun)(GLFWwindow *)
const char * rs2_gl_extension_to_string(rs2_extension type)
void(* glfwSwapIntervalFun)(int)
GLFWwindow *(* glfwGetCurrentContextFun)(void)
void(* glfwWindowHintFun)(int, int)
glfwSwapIntervalFun glfwSwapInterval
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:42
void rs2_gl_init_processing_glfw(int api_version, GLFWwindow *share_with, glfw_binding bindings, int use_glsl, rs2_error **error)
rs2_gl_extension
rs2_processing_block * rs2_gl_create_camera_renderer(int api_version, rs2_error **error)
void rs2_gl_init_rendering(int api_version, int use_glsl, rs2_error **error)
rs2_processing_block * rs2_gl_create_uploader(int api_version, rs2_error **error)
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:166
GLenum type
void(* glfwDestroyWindowFun)(GLFWwindow *)
glfwGetCurrentContextFun glfwGetCurrentContext
rs2_processing_block * rs2_gl_create_align(int api_version, rs2_stream to, rs2_error **error)
rs2_gl_matrix_type
unsigned int rs2_gl_frame_get_texture_id(const rs2_frame *f, unsigned int id, rs2_error **error)
glfwWindowHintFun glfwWindowHint
int(* glfwInitFun)(void)
rs2_processing_block * rs2_gl_create_pointcloud(int api_version, rs2_error **error)
GLFWwindow *(* glfwCreateWindowFun)(int, int, const char *, GLFWmonitor *, GLFWwindow *)
struct GLFWwindow GLFWwindow
struct rs2_frame rs2_frame
Definition: rs_types.h:261
void rs2_gl_init_processing(int api_version, int use_glsl, rs2_error **error)


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:40