Ocean
GLESceneGraph.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_RENDERING_GLES_GLESCENEGRAPH_H
9 #define META_OCEAN_RENDERING_GLES_GLESCENEGRAPH_H
10 
12 
13 #ifdef OCEAN_PLATFORM_BUILD_MOBILE
14  // we use OpenGL ES on Android and iOS, otherwise we use OpenGL
15  #define OCEAN_RENDERING_GLES_USE_ES
16 #endif
17 
18 #ifndef OCEAN_RENDERING_GLES_USE_ES
19  #ifdef _WINDOWS
20  // Windows does not provide libraries for OpenGL 2.0+ so that we have to load the function pointers at runtime
21  #define OCEAN_RENDERING_GLES_USE_DYNAMIC_LIBRARY
22  #endif
23 #endif
24 
25 // Defines OCEAN_RENDERING_GLES_EXPORT for dll export and import.
26 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
27  #ifdef USE_OCEAN_RENDERING_GLES_EXPORT
28  #define OCEAN_RENDERING_GLES_EXPORT __declspec(dllexport)
29  #else
30  #define OCEAN_RENDERING_GLES_EXPORT __declspec(dllimport)
31  #endif
32 #else
33  #define OCEAN_RENDERING_GLES_EXPORT
34 #endif
35 
36 namespace Ocean
37 {
38 
39 namespace Rendering
40 {
41 
42 namespace GLESceneGraph
43 {
44 
45 /**
46  * @ingroup rendering
47  * @defgroup renderinggles Ocean Rendering GLESceneGraph Library
48  * @{
49  * The Ocean Rendering GLESceneGraph Library is a rendering library using OpenGL ES for rendering.
50  * This library is platform independent.<br>
51  * However, the library is using Nativ Platform Graphic Interface (EGL) as default.<br>
52  * To avoid the usage of the EGL implement an own engine and framebuffer object.<br>
53  * @}
54  */
55 
56 /**
57  * @namespace Ocean::Rendering::GLESceneGraph Namespace of the Rendering GLESceneGraph library.<p>
58  * The Namespace Ocean::Rendering::GLESceneGraph is used in the entire Ocean Rendering GLESceneGraph Library.
59  */
60 
61 /**
62  * Returns the name of this GLESceneGraph library.
63  * @ingroup renderinggles
64  */
65 OCEAN_RENDERING_GLES_EXPORT const std::string& nameGLESceneGraphEngine();
66 
67 #if defined(OCEAN_RUNTIME_STATIC)
68 
69 /**
70  * Unregisters this rendering engine at the global engine manager.
71  * This function calls GLESEngine::unregisterEngine() only.
72  * @return True, if succeeded
73  * @ingroup renderinggles
74  */
76 
77 #endif // OCEAN_RUNTIME_STATIC
78 
79 }
80 
81 }
82 
83 }
84 
85 #endif // META_OCEAN_RENDERING_GLES_GLESCENEGRAPH_H
OCEAN_RENDERING_GLES_EXPORT const std::string & nameGLESceneGraphEngine()
Returns the name of this GLESceneGraph library.
bool unregisterGLESceneGraphEngine()
Unregisters this rendering engine at the global engine manager.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15