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 
54  rs2_extension select_extension(const rs2::frame& input) override;
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 }
std::shared_ptr< rs2::gl::pointcloud > _pc
Definition: align-gl.h:59
GLint GLint GLsizei GLsizei GLsizei depth
Definition: animated.h:9
std::shared_ptr< rs2::texture_buffer > _other_texture
Definition: align-gl.h:62
std::shared_ptr< rs2::gl::pointcloud_renderer > _renderer
Definition: align-gl.h:60
unsigned int uint32_t
Definition: stdint.h:80
std::shared_ptr< rs2::gl::uploader > _upload
Definition: align-gl.h:61
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:42
Cross-stream extrinsics: encodes the topology describing how the different devices are oriented...
Definition: rs_sensor.h:98
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:166
rs2_extrinsics extr
Definition: test-pose.cpp:252
static const textual_icon camera
Definition: model-views.h:220
Video stream intrinsics.
Definition: rs_types.h:58


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Thu Dec 22 2022 03:41:41