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// Qt-Security score:significant reason:default
4
5#ifndef QOPENGLVERTEXARRAYOBJECT_P_H
6#define QOPENGLVERTEXARRAYOBJECT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of the Qt OpenGL classes. This header file may change from
14// version to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtOpenGL/qtopenglglobal.h>
20
21#include <QtGui/qopengl.h>
22#include <QtCore/private/qglobal_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class QOpenGLContext;
27
29{
31
32private:
34 : GenVertexArrays(nullptr)
35 , DeleteVertexArrays(nullptr)
36 , BindVertexArray(nullptr)
37 , IsVertexArray(nullptr)
38 {
40 }
41
43
44public:
45 static Q_OPENGL_EXPORT QOpenGLVertexArrayObjectHelper *vertexArrayObjectHelperForContext(QOpenGLContext *context);
46
47 inline bool isValid() const
48 {
49 return GenVertexArrays && DeleteVertexArrays && BindVertexArray && IsVertexArray;
50 }
51
52 inline void glGenVertexArrays(GLsizei n, GLuint *arrays) const
53 {
54 GenVertexArrays(n, arrays);
55 }
56
57 inline void glDeleteVertexArrays(GLsizei n, const GLuint *arrays) const
58 {
59 DeleteVertexArrays(n, arrays);
60 }
61
62 inline void glBindVertexArray(GLuint array) const
63 {
64 BindVertexArray(array);
65 }
66
67 inline GLboolean glIsVertexArray(GLuint array) const
68 {
69 return IsVertexArray(array);
70 }
71
72 // Function signatures are equivalent between desktop core, ARB, APPLE, ES 3 and ES 2 extensions
74 typedef void (QOPENGLF_APIENTRYP qt_DeleteVertexArrays_t)(GLsizei n, const GLuint *arrays);
75 typedef void (QOPENGLF_APIENTRYP qt_BindVertexArray_t)(GLuint array);
77
82};
83
84QT_END_NAMESPACE
85
86#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