KWin
Loading...
Searching...
No Matches
glutils_funcs.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2007 Rivo Laks <rivolaks@hot.ee>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "kwin_export.h"
13
14#include <epoxy/gl.h>
15#include <functional>
16
17// qopengl.h declares GLdouble as a typedef of float when Qt is built
18// with GLES support. This conflicts with the epoxy/gl_generated.h
19// declaration, so we have to prevent the Qt header from being #included.
20#define QOPENGL_H
21
22#ifndef QOPENGLF_APIENTRY
23#define QOPENGLF_APIENTRY GLAPIENTRY
24#endif
25
26#ifndef QOPENGLF_APIENTRYP
27#define QOPENGLF_APIENTRYP GLAPIENTRYP
28#endif
29
30namespace KWin
31{
32
33typedef void (*resolveFuncPtr)();
34void KWIN_EXPORT glResolveFunctions(const std::function<resolveFuncPtr(const char *)> &resolveFunction);
35
36// GL_ARB_robustness / GL_EXT_robustness
37using glGetGraphicsResetStatus_func = GLenum (*)();
38using glReadnPixels_func = void (*)(GLint x, GLint y, GLsizei width, GLsizei height,
39 GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
40using glGetnUniformfv_func = void (*)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
41
43extern KWIN_EXPORT glReadnPixels_func glReadnPixels;
44extern KWIN_EXPORT glGetnUniformfv_func glGetnUniformfv;
45
46} // namespace
glReadnPixels_func glReadnPixels
glGetnUniformfv_func glGetnUniformfv
Session::Type type
Definition session.cpp:17
void(* resolveFuncPtr)()
Definition glutils.h:31
GLenum format
Definition gltexture.cpp:49
GLenum(*)() glGetGraphicsResetStatus_func
void(*)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params) glGetnUniformfv_func
glGetGraphicsResetStatus_func glGetGraphicsResetStatus
void(*)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data) glReadnPixels_func
void glResolveFunctions(const std::function< resolveFuncPtr(const char *)> &resolveFunction)