MRPT  1.9.9
RenderQueue.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/opengl/Shader.h>
13 #include <cstdint>
14 #include <deque>
15 #include <map>
16 
17 namespace mrpt::opengl
18 {
19 class CRenderizable;
20 
21 /** Each element in the queue to be rendered for each keyframe
22  * \ingroup mrpt_opengl_grp
23  */
25 {
26  RenderQueueElement() = default;
27 
29  const mrpt::opengl::CRenderizable* obj,
30  const mrpt::opengl::TRenderMatrices& state)
31  : object(obj), renderState(state)
32  {
33  }
34 
35  const mrpt::opengl::CRenderizable* object = nullptr;
37 };
38 
39 /** A queue for rendering, sorted by shader program to minimize changes of
40  * OpenGL shader programs while rendering a scene.
41  * Within each shader, objects are sorted by eye-to-object distance, so we can
42  * later render them from back to front to render transparencies properly Filled
43  * by sortRenderObjectsByShader() \ingroup mrpt_opengl_grp
44  */
45 using RenderQueue =
46  std::map<shader_id_t, std::multimap<float, RenderQueueElement>>;
47 
48 } // namespace mrpt::opengl
const mrpt::opengl::CRenderizable * object
Definition: RenderQueue.h:35
The base class of 3D objects that can be directly rendered through OpenGL.
Definition: CRenderizable.h:48
Rendering state related to the projection and model-view matrices.
Each element in the queue to be rendered for each keyframe.
Definition: RenderQueue.h:24
mrpt::opengl::TRenderMatrices renderState
Definition: RenderQueue.h:36
The namespace for 3D scene representation and rendering.
Definition: CGlCanvasBase.h:13
RenderQueueElement(const mrpt::opengl::CRenderizable *obj, const mrpt::opengl::TRenderMatrices &state)
Definition: RenderQueue.h:28
std::map< shader_id_t, std::multimap< float, RenderQueueElement > > RenderQueue
A queue for rendering, sorted by shader program to minimize changes of OpenGL shader programs while r...
Definition: RenderQueue.h:46



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020