camera-shader.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 "opengl3.h"
7 #include "synthetic-stream-gl.h"
9 
10 namespace librealsense
11 {
12  namespace gl
13  {
15  {
16  public:
17  camera_shader();
18 
19  void begin();
20  void end();
21 
22  void set_mvp(const rs2::matrix4& model,
23  const rs2::matrix4& view,
24  const rs2::matrix4& projection);
25 
26  void set_opacity(float opacity);
27  protected:
28  std::unique_ptr<rs2::shader_program> _shader;
29 
30  private:
31  void init();
32 
37  };
38 
40  public gpu_rendering_object,
41  public matrix_container
42  {
43  public:
45  ~camera_renderer() override;
46 
47  void cleanup_gpu_resources() override;
48  void create_gpu_resources() override;
49 
50  rs2::frame process_frame(const rs2::frame_source& source, const rs2::frame& f) override;
51 
52  private:
53  std::vector<rs2::obj_mesh> camera_mesh;
54  std::shared_ptr<camera_shader> _shader;
55  std::vector<std::unique_ptr<rs2::vao>> _camera_model;
56 
58  };
59 
60  }
61 }
GLsizei GLsizei GLchar * source
void set_opacity(float opacity)
std::unique_ptr< rs2::shader_program > _shader
Definition: camera-shader.h:28
unsigned int uint32_t
Definition: stdint.h:80
std::vector< std::unique_ptr< rs2::vao > > _camera_model
Definition: camera-shader.h:55
void set_mvp(const rs2::matrix4 &model, const rs2::matrix4 &view, const rs2::matrix4 &projection)
GLdouble f
std::vector< rs2::obj_mesh > camera_mesh
Definition: camera-shader.h:53
std::shared_ptr< camera_shader > _shader
Definition: camera-shader.h:54


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