MRPT  1.9.9
DefaultShaders.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 
12 #include <mrpt/opengl/Shader.h>
13 #include <cstdint>
14 
15 namespace mrpt::opengl
16 {
17 // Note: do not use a enum-class to allow easy conversion from names to values:
18 // It's preferred to left the entities that are more likely to be transparent
19 // (triangles) at the end (higher IDs), so they get rendered last and
20 // transparency works better. Within each shader, objects are also sorted by
21 // inverse eye-distance for this reason.
23 {
24  static constexpr shader_id_t POINTS = 0;
25  static constexpr shader_id_t WIREFRAME = 1;
26  static constexpr shader_id_t TEXT = 2;
27  static constexpr shader_id_t TRIANGLES = 3;
28  static constexpr shader_id_t TEXTURED_TRIANGLES = 4;
29 };
30 
31 /** Loads a set of OpenGL Vertex+Fragment shaders from the default library
32  * available in mrpt::opengl.
33  *
34  * \sa CRenderizable
35  * \ingroup mrpt_opengl_grp
36  */
38 
39 } // namespace mrpt::opengl
static constexpr shader_id_t TEXTURED_TRIANGLES
static constexpr shader_id_t TEXT
static constexpr shader_id_t WIREFRAME
uint8_t shader_id_t
Type for IDs of shaders.
Definition: Shader.h:23
static constexpr shader_id_t TRIANGLES
Program::Ptr LoadDefaultShader(const shader_id_t id)
Loads a set of OpenGL Vertex+Fragment shaders from the default library available in mrpt::opengl...
The namespace for 3D scene representation and rendering.
Definition: CGlCanvasBase.h:13
static constexpr shader_id_t POINTS



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