@@ -20,41 +20,38 @@ enum class GLApi : std::uint8_t
2020/* *
2121 * @brief Requirements to validate against the current GL context.
2222 */
23- struct GLRequirements
24- {
25- GLApi api{GLApi::Any}; // !< Required API (Any/OpenGL/OpenGLES)
26- int minMajor{}; // !< Minimum major version
27- int minMinor{}; // !< Minimum minor version
28- bool requireCoreProfile{false }; // !< Desktop GL only; ignored for GLES
29- int minShaderMajor{}; // !< Minimum shading language major version (GLSL/ESSL)
30- int minShaderMinor{}; // !< Minimum shading language minor version (GLSL/ESSL)
23+ struct GLRequirements {
24+ GLApi api{GLApi::Any}; // !< Required API (Any/OpenGL/OpenGLES)
25+ int minMajor{}; // !< Minimum major version
26+ int minMinor{}; // !< Minimum minor version
27+ bool requireCoreProfile{false }; // !< Desktop GL only; ignored for GLES
28+ int minShaderMajor{}; // !< Minimum shading language major version (GLSL/ESSL)
29+ int minShaderMinor{}; // !< Minimum shading language minor version (GLSL/ESSL)
3130};
3231
3332/* *
3433 * @brief Compact information about the current GL context.
3534 */
36- struct GLInfo
37- {
38- GLApi api{GLApi::Any}; // !< Detected API (WebGL is treated as GLES-like on Emscripten)
39- int major{}; // !< Detected major version
40- int minor{}; // !< Detected minor version
41- std::string versionStr; // !< GL_VERSION
42- std::string glslStr; // !< GL_SHADING_LANGUAGE_VERSION
43- std::string vendor; // !< GL_VENDOR
44- std::string renderer; // !< GL_RENDERER
45- std::string profile; // !< "core", "compat", "unknown", "n/a"
46- std::string flags; // !< "debug,fwd,robust", "none", "n/a"
35+ struct GLInfo {
36+ GLApi api{GLApi::Any}; // !< Detected API (WebGL is treated as GLES-like on Emscripten)
37+ int major{}; // !< Detected major version
38+ int minor{}; // !< Detected minor version
39+ std::string versionStr; // !< GL_VERSION
40+ std::string glslStr; // !< GL_SHADING_LANGUAGE_VERSION
41+ std::string vendor; // !< GL_VENDOR
42+ std::string renderer; // !< GL_RENDERER
43+ std::string profile; // !< "core", "compat", "unknown", "n/a"
44+ std::string flags; // !< "debug,fwd,robust", "none", "n/a"
4745};
4846
4947/* *
5048 * @brief Result of a GL context check.
5149 */
52- struct GLProbeResult
53- {
54- bool success{false }; // !< True if requirements are met
55- std::string reason; // !< Failure reason (empty on success)
56- GLRequirements req; // !< Requirements used
57- GLInfo info; // !< Detected context info
50+ struct GLProbeResult {
51+ bool success{false }; // !< True if requirements are met
52+ std::string reason; // !< Failure reason (empty on success)
53+ GLRequirements req; // !< Requirements used
54+ GLInfo info; // !< Detected context info
5855};
5956
6057/* *
@@ -68,16 +65,15 @@ class GLProbe final
6865 /* *
6966 * @brief GL function pointer parameter type.
7067 */
71- struct GLFunctions
72- {
68+ struct GLFunctions {
7369 /* *
7470 * Opaque procedure address.
7571 */
7672 using ProcAddress = void *;
7773
78- ProcAddress getString{}; // !< glGetString
79- ProcAddress getError{}; // !< glGetError
80- ProcAddress getIntegerv{}; // !< glGetIntegerv
74+ ProcAddress getString{}; // !< glGetString
75+ ProcAddress getError{}; // !< glGetError
76+ ProcAddress getIntegerv{}; // !< glGetIntegerv
8177 };
8278
8379 /* *
@@ -104,7 +100,7 @@ class GLProbe final
104100 auto Build (GLInfo& info, std::string& reason) -> bool;
105101
106102 private:
107- GLFunctions m_gl; // !< GL functions used for checks.
103+ GLFunctions m_gl; // !< GL functions used for checks.
108104 };
109105
110106 /* *
@@ -164,7 +160,6 @@ class GLProbe final
164160 * @brief Formats GL context info as a compact summary string.
165161 */
166162 [[nodiscard]] static auto FormatCompactLine (const GLInfo& info) -> std::string;
167-
168163};
169164
170165} // namespace Platform
0 commit comments