Gazebo Rendering

API Reference

6.6.3
gz/rendering/GraphicsAPI.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef IGNITION_RENDERING_GRAPHICSAPI_HH_
18 #define IGNITION_RENDERING_GRAPHICSAPI_HH_
19 
20 #include <cstdint>
21 #include <string>
24 
25 namespace ignition
26 {
27  namespace rendering
28  {
29  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
30 
32  enum class IGNITION_RENDERING_VISIBLE GraphicsAPI : uint16_t
33  {
38 
41 
43  OPENGL = 1,
44 
46  DIRECT3D11 = 2,
47 
49  VULKAN = 3,
50 
52  METAL = 4,
53 
58  };
59 
61  class IGNITION_RENDERING_VISIBLE GraphicsAPIUtils
62  {
68  public: static std::string Str(GraphicsAPI _e);
69 
75  public: static GraphicsAPI Set(const std::string &_str);
76  };
77  }
78  }
79 }
80 #endif
STL class.
@ DIRECT3D11
Direct3D11 graphics interface.
@ OPENGL
OpenGL graphics interface.
@ METAL
Metal graphics interface.
static GraphicsAPI Set(const std::string &_str)
Set an enum from a string. This function requires a valid string, and an array of names for the enum ...
Utils to convert GraphicsAPI to and from strings.
Definition: gz/rendering/GraphicsAPI.hh:61
GraphicsAPI
The graphics API used by the render engine.
Definition: gz/rendering/GraphicsAPI.hh:32
@ UNKNOWN
Unknown graphics interface.
static std::string Str(GraphicsAPI _e)
Convert enum value to string.
@ VULKAN
Vulkan graphics interface.