10#ifndef INCLUDED_VCL_OPENGL_OPENGLHELPER_HXX
11#define INCLUDED_VCL_OPENGL_OPENGLHELPER_HXX
18#include <rtl/ustring.hxx>
23#define VCL_GL_INFO(stream) \
25 if (SAL_DETAIL_ENABLE_LOG_INFO) \
27 ::std::ostringstream detail_stream; \
28 detail_stream << stream; \
29 OpenGLHelper::debugMsgStream(detail_stream); \
34#define VCL_GL_WARN(stream) \
36 if (SAL_DETAIL_ENABLE_LOG_INFO) \
38 ::std::ostringstream detail_stream; \
39 detail_stream << stream; \
40 OpenGLHelper::debugMsgStreamWarn(detail_stream); \
52 static OString GetDigest(
const OUString& rVertexShaderName,
const OUString& rFragmentShaderName, std::string_view preamble );
55 static GLint LoadShaders(
const OUString& rVertexShaderName,
const OUString& rFragmentShaderName,
const OUString& rGeometryShaderName, std::string_view preamble, std::string_view rDigest );
56 static GLint LoadShaders(
const OUString& rVertexShaderName,
const OUString& rFragmentShaderName, std::string_view preamble, std::string_view rDigest );
57 static GLint LoadShaders(
const OUString& rVertexShaderName,
const OUString& rFragmentShaderName,
const OUString& rGeometryShaderName);
58 static GLint LoadShaders(
const OUString& rVertexShaderName,
const OUString& rFragmentShaderName);
69 static GLenum OptimalBufferFormat();
72 static const char* GLErrorString(GLenum errorCode);
87 GLuint& nRenderbufferDepthId, GLuint& nRenderbufferColorId);
90 static float getGLVersion();
92 static void checkGLError(
const char* aFile,
size_t nLine);
101 static void debugMsgPrint(
const int nType,
const char *pFormat, ...);
102 static void debugMsgStream(std::ostringstream
const &pStream);
103 static void debugMsgStreamWarn(std::ostringstream
const &pStream);
108 static bool isDeviceDenylisted();
113 static bool supportsOpenGL();
117#define CHECK_GL_ERROR() OpenGLHelper::checkGLError(__FILE__, __LINE__)
119#define CHECK_GL_ERROR() do { } while (false)
unsigned _Unwind_Word __attribute__((__mode__(__word__)))