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 }
22 
23 namespace librealsense
24 {
25  namespace gl
26  {
27  class align_gl : public align, public gpu_processing_object
28  {
29  public:
30  ~align_gl() override;
31  align_gl(rs2_stream to_stream);
32 
33  protected:
34  void align_z_to_other(rs2::video_frame& aligned,
35  const rs2::video_frame& depth,
37  float z_scale) override;
38 
39  void align_other_to_z(rs2::video_frame& aligned,
40  const rs2::video_frame& depth,
41  const rs2::video_frame& other,
42  float z_scale) override;
43 
44  void cleanup_gpu_resources() override;
45  void create_gpu_resources() override;
46 
47  void render(const rs2::points& model,
48  const rs2::video_frame& tex,
49  const rs2_intrinsics& camera,
50  const rs2_extrinsics& extr,
51  uint32_t output_texture);
52 
53  rs2_extension select_extension(const rs2::frame& input) override;
54 
55  private:
56  int _enabled = 0;
57 
58  std::shared_ptr<rs2::gl::pointcloud> _pc;
59  std::shared_ptr<rs2::gl::pointcloud_renderer> _renderer;
60  std::shared_ptr<rs2::gl::uploader> _upload;
61  std::shared_ptr<rs2::texture_buffer> _other_texture;
62  };
63  }
64 }
std::shared_ptr< rs2::gl::pointcloud > _pc
Definition: align-gl.h:58
GLint GLint GLsizei GLsizei GLsizei depth
Definition: cah-model.h:10
std::shared_ptr< rs2::texture_buffer > _other_texture
Definition: align-gl.h:61
std::shared_ptr< rs2::gl::pointcloud_renderer > _renderer
Definition: align-gl.h:59
unsigned int uint32_t
Definition: stdint.h:80
std::shared_ptr< rs2::gl::uploader > _upload
Definition: align-gl.h:60
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:96
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:166
GLenum GLenum GLenum input
Definition: glext.h:10805
rs2_extrinsics extr
Definition: test-pose.cpp:258
static const textual_icon camera
Definition: model-views.h:219
Video stream intrinsics.
Definition: rs_types.h:58


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