align-gl.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2019 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include <map>
7 #include <vector>
8 
9 #include "proc/align.h"
10 #include "synthetic-stream-gl.h"
11 
12 #include <librealsense2/rs.hpp>
13 #include "opengl3.h"
14 
15 #include <memory>
16 
17 namespace rs2
18 {
19  class stream_profile;
20  class visualizer_2d;
21  class texture_buffer;
22 }
23 
24 namespace librealsense
25 {
26  namespace gl
27  {
28  class align_gl : public align, public gpu_processing_object
29  {
30  public:
31  ~align_gl() override;
32  align_gl(rs2_stream to_stream);
33 
34  protected:
35  void align_z_to_other(rs2::video_frame& aligned,
36  const rs2::video_frame& depth,
38  float z_scale) override;
39 
40  void align_other_to_z(rs2::video_frame& aligned,
41  const rs2::video_frame& depth,
42  const rs2::video_frame& other,
43  float z_scale) override;
44 
45  void cleanup_gpu_resources() override;
46  void create_gpu_resources() override;
47 
48  void render(const rs2::points& model,
49  const rs2::video_frame& tex,
50  const rs2_intrinsics& camera,
51  const rs2_extrinsics& extr,
52  uint32_t output_texture);
53 
55 
56  private:
57  int _enabled = 0;
58 
59  std::shared_ptr<rs2::gl::pointcloud> _pc;
60  std::shared_ptr<rs2::gl::pointcloud_renderer> _renderer;
61  std::shared_ptr<rs2::gl::uploader> _upload;
62  std::shared_ptr<rs2::texture_buffer> _other_texture;
63  };
64  }
65 }
librealsense::gl::gpu_processing_object
Definition: synthetic-stream-gl.h:293
librealsense
Definition: algo.h:18
librealsense::gl::align_gl::cleanup_gpu_resources
void cleanup_gpu_resources() override
Definition: align-gl.cpp:35
rs2::frame
Definition: rs_frame.hpp:345
opengl3.h
rs-imu-calibration.input
input
Definition: rs-imu-calibration.py:35
align.h
rs2_extrinsics
Cross-stream extrinsics: encodes the topology describing how the different devices are oriented.
Definition: rs_sensor.h:102
librealsense::gl::align_gl::align_z_to_other
void align_z_to_other(rs2::video_frame &aligned, const rs2::video_frame &depth, const rs2::video_stream_profile &other_profile, float z_scale) override
Definition: align-gl.cpp:53
librealsense::gl::align_gl::_pc
std::shared_ptr< rs2::gl::pointcloud > _pc
Definition: align-gl.h:59
librealsense::gl::align_gl::~align_gl
~align_gl() override
Definition: align-gl.cpp:275
synthetic-stream-gl.h
rs2_extension
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:134
rs2_intrinsics
Video stream intrinsics.
Definition: rs_types.h:58
librealsense::gl::align_gl::_other_texture
std::shared_ptr< rs2::texture_buffer > _other_texture
Definition: align-gl.h:62
librealsense::gl::align_gl::_enabled
int _enabled
Definition: align-gl.h:57
uint32_t
unsigned int uint32_t
Definition: stdint.h:80
extr
rs2_extrinsics extr
Definition: test-pose.cpp:249
rs2::video_stream_profile
Definition: rs_frame.hpp:201
rs2::points
Definition: rs_frame.hpp:739
rs.hpp
rs2
Definition: animated.h:9
librealsense::gl::align_gl::create_gpu_resources
void create_gpu_resources() override
Definition: align-gl.cpp:44
librealsense::gl::align_gl::select_extension
rs2_extension select_extension(const rs2::frame &input) override
Definition: align-gl.cpp:29
pyglet_pointcloud_viewer.other_profile
other_profile
Definition: pyglet_pointcloud_viewer.py:156
test-unit-transform.model
model
Definition: test-unit-transform.py:27
librealsense::gl::align_gl::_upload
std::shared_ptr< rs2::gl::uploader > _upload
Definition: align-gl.h:61
librealsense::gl::align_gl::align_other_to_z
void align_other_to_z(rs2::video_frame &aligned, const rs2::video_frame &depth, const rs2::video_frame &other, float z_scale) override
Definition: align-gl.cpp:231
librealsense::gl::align_gl::render
void render(const rs2::points &model, const rs2::video_frame &tex, const rs2_intrinsics &camera, const rs2_extrinsics &extr, uint32_t output_texture)
Definition: align-gl.cpp:152
librealsense::align
Definition: align.h:14
rs2::textual_icons::camera
static const textual_icon camera
Definition: device-model.h:187
rs2::video_frame
Definition: rs_frame.hpp:638
librealsense::gl::align_gl::align_gl
align_gl(rs2_stream to_stream)
Definition: align-gl.cpp:263
librealsense::gl::align_gl
Definition: align-gl.h:28
rs2_stream
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:43
depth
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glad/glad/glad.h:2398
test-motion.stream_profile
stream_profile
Definition: sw-dev/test-motion.py:26
librealsense::gl::align_gl::_renderer
std::shared_ptr< rs2::gl::pointcloud_renderer > _renderer
Definition: align-gl.h:60


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Mon Apr 22 2024 02:12:55