summaryrefslogtreecommitdiffstats
path: root/xbmc/utils/GLUtils.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2020-10-19 00:52:24 +0200
committermanuel <manuel@mausz.at>2020-10-19 00:52:24 +0200
commitbe933ef2241d79558f91796cc5b3a161f72ebf9c (patch)
treefe3ab2f130e20c99001f2d7a81d610c78c96a3f4 /xbmc/utils/GLUtils.h
parent5f8335c1e49ce108ef3481863833c98efa00411b (diff)
downloadkodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.tar.gz
kodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.tar.bz2
kodi-pvr-build-be933ef2241d79558f91796cc5b3a161f72ebf9c.zip
sync with upstream
Diffstat (limited to 'xbmc/utils/GLUtils.h')
-rw-r--r--xbmc/utils/GLUtils.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/xbmc/utils/GLUtils.h b/xbmc/utils/GLUtils.h
new file mode 100644
index 0000000..2dea067
--- /dev/null
+++ b/xbmc/utils/GLUtils.h
@@ -0,0 +1,46 @@
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11// GL Error checking macro
12// this function is useful for tracking down GL errors, which otherwise
13// just result in undefined behavior and can be difficult to track down.
14//
15// Just call it 'VerifyGLState()' after a sequence of GL calls
16//
17// if GL_DEBUGGING and HAS_GL are defined, the function checks
18// for GL errors and prints the current state of the various matrices;
19// if not it's just an empty inline stub, and thus won't affect performance
20// and will be optimized out.
21
22#include "system_gl.h"
23
24namespace KODI
25{
26namespace UTILS
27{
28namespace GL
29{
30
31void GlErrorCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
32
33}
34}
35}
36
37void _VerifyGLState(const char* szfile, const char* szfunction, int lineno);
38#if defined(GL_DEBUGGING) && (defined(HAS_GL) || defined(HAS_GLES))
39#define VerifyGLState() _VerifyGLState(__FILE__, __FUNCTION__, __LINE__)
40#else
41#define VerifyGLState()
42#endif
43
44void LogGraphicsInfo();
45
46int glFormatElementByteCount(GLenum format);