Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qopenglvertexarrayobject_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Sean Harmer <sean.harmer@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOPENGLVERTEXARRAYOBJECT_P_H
5#define QOPENGLVERTEXARRAYOBJECT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the Qt OpenGL classes. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtOpenGL/qtopenglglobal.h>
19
20#include <QtGui/qopengl.h>
21#include <QtCore/private/qglobal_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class QOpenGLContext;
26
28{
30
31private:
33 : GenVertexArrays(nullptr)
34 , DeleteVertexArrays(nullptr)
35 , BindVertexArray(nullptr)
36 , IsVertexArray(nullptr)
37 {
39 }
40
42
43public:
44 static Q_OPENGL_EXPORT QOpenGLVertexArrayObjectHelper *vertexArrayObjectHelperForContext(QOpenGLContext *context);
45
46 inline bool isValid() const
47 {
48 return GenVertexArrays && DeleteVertexArrays && BindVertexArray && IsVertexArray;
49 }
50
51 inline void glGenVertexArrays(GLsizei n, GLuint *arrays) const
52 {
53 GenVertexArrays(n, arrays);
54 }
55
56 inline void glDeleteVertexArrays(GLsizei n, const GLuint *arrays) const
57 {
58 DeleteVertexArrays(n, arrays);
59 }
60
61 inline void glBindVertexArray(GLuint array) const
62 {
63 BindVertexArray(array);
64 }
65
66 inline GLboolean glIsVertexArray(GLuint array) const
67 {
68 return IsVertexArray(array);
69 }
70
71 // Function signatures are equivalent between desktop core, ARB, APPLE, ES 3 and ES 2 extensions
73 typedef void (QOPENGLF_APIENTRYP qt_DeleteVertexArrays_t)(GLsizei n, const GLuint *arrays);
74 typedef void (QOPENGLF_APIENTRYP qt_BindVertexArray_t)(GLuint array);
76
81};
82
83QT_END_NAMESPACE
84
85#endif // QOPENGLVERTEXARRAYOBJECT_P_H
typedef void(QOPENGLF_APIENTRYP qt_GenVertexArrays_t)(GLsizei n
typedef GLboolean(QOPENGLF_APIENTRYP qt_IsVertexArray_t)(GLuint array)
void glGenVertexArrays(GLsizei n, GLuint *arrays) const
void glDeleteVertexArrays(GLsizei n, const GLuint *arrays) const
GLboolean glIsVertexArray(GLuint array) const