1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the QtQuick module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#ifndef QQUICKNVPRFUNCTIONS_P_H
41#define QQUICKNVPRFUNCTIONS_P_H
42
43//
44// W A R N I N G
45// -------------
46//
47// This file is not part of the Qt API. It exists for the convenience
48// of a number of Qt sources files. This header file may change from
49// version to version without notice, or even be removed.
50//
51// We mean it.
52//
53
54#include <QtQuickShapes/private/qquickshapesglobal_p.h>
55#include <qopengl.h>
56#include <QtGui/qsurfaceformat.h>
57
58#if QT_CONFIG(opengl)
59
60QT_BEGIN_NAMESPACE
61
62// note: fixed pipeline specific functions are removed - modern ES ext
63// headers have all this, but not the fixed stuff
64
65#ifndef GL_NV_path_rendering
66#define GL_PATH_FORMAT_SVG_NV 0x9070
67#define GL_PATH_FORMAT_PS_NV 0x9071
68#define GL_STANDARD_FONT_NAME_NV 0x9072
69#define GL_SYSTEM_FONT_NAME_NV 0x9073
70#define GL_FILE_NAME_NV 0x9074
71#define GL_PATH_STROKE_WIDTH_NV 0x9075
72#define GL_PATH_END_CAPS_NV 0x9076
73#define GL_PATH_INITIAL_END_CAP_NV 0x9077
74#define GL_PATH_TERMINAL_END_CAP_NV 0x9078
75#define GL_PATH_JOIN_STYLE_NV 0x9079
76#define GL_PATH_MITER_LIMIT_NV 0x907A
77#define GL_PATH_DASH_CAPS_NV 0x907B
78#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
79#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
80#define GL_PATH_DASH_OFFSET_NV 0x907E
81#define GL_PATH_CLIENT_LENGTH_NV 0x907F
82#define GL_PATH_FILL_MODE_NV 0x9080
83#define GL_PATH_FILL_MASK_NV 0x9081
84#define GL_PATH_FILL_COVER_MODE_NV 0x9082
85#define GL_PATH_STROKE_COVER_MODE_NV 0x9083
86#define GL_PATH_STROKE_MASK_NV 0x9084
87#define GL_COUNT_UP_NV 0x9088
88#define GL_COUNT_DOWN_NV 0x9089
89#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
90#define GL_CONVEX_HULL_NV 0x908B
91#define GL_BOUNDING_BOX_NV 0x908D
92#define GL_TRANSLATE_X_NV 0x908E
93#define GL_TRANSLATE_Y_NV 0x908F
94#define GL_TRANSLATE_2D_NV 0x9090
95#define GL_TRANSLATE_3D_NV 0x9091
96#define GL_AFFINE_2D_NV 0x9092
97#define GL_AFFINE_3D_NV 0x9094
98#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
99#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
100#define GL_UTF8_NV 0x909A
101#define GL_UTF16_NV 0x909B
102#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
103#define GL_PATH_COMMAND_COUNT_NV 0x909D
104#define GL_PATH_COORD_COUNT_NV 0x909E
105#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
106#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
107#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
108#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
109#define GL_SQUARE_NV 0x90A3
110#define GL_ROUND_NV 0x90A4
111#define GL_TRIANGULAR_NV 0x90A5
112#define GL_BEVEL_NV 0x90A6
113#define GL_MITER_REVERT_NV 0x90A7
114#define GL_MITER_TRUNCATE_NV 0x90A8
115#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
116#define GL_USE_MISSING_GLYPH_NV 0x90AA
117#define GL_PATH_ERROR_POSITION_NV 0x90AB
118#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
119#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
120#define GL_ADJACENT_PAIRS_NV 0x90AE
121#define GL_FIRST_TO_REST_NV 0x90AF
122#define GL_PATH_GEN_MODE_NV 0x90B0
123#define GL_PATH_GEN_COEFF_NV 0x90B1
124#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
125#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
126#define GL_PATH_STENCIL_FUNC_NV 0x90B7
127#define GL_PATH_STENCIL_REF_NV 0x90B8
128#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
129#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
130#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
131#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
132#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
133#define GL_MOVE_TO_RESETS_NV 0x90B5
134#define GL_MOVE_TO_CONTINUES_NV 0x90B6
135#define GL_CLOSE_PATH_NV 0x00
136#define GL_MOVE_TO_NV 0x02
137#define GL_RELATIVE_MOVE_TO_NV 0x03
138#define GL_LINE_TO_NV 0x04
139#define GL_RELATIVE_LINE_TO_NV 0x05
140#define GL_HORIZONTAL_LINE_TO_NV 0x06
141#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
142#define GL_VERTICAL_LINE_TO_NV 0x08
143#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
144#define GL_QUADRATIC_CURVE_TO_NV 0x0A
145#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
146#define GL_CUBIC_CURVE_TO_NV 0x0C
147#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
148#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
149#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
150#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
151#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
152#define GL_SMALL_CCW_ARC_TO_NV 0x12
153#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
154#define GL_SMALL_CW_ARC_TO_NV 0x14
155#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
156#define GL_LARGE_CCW_ARC_TO_NV 0x16
157#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
158#define GL_LARGE_CW_ARC_TO_NV 0x18
159#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
160#define GL_RESTART_PATH_NV 0xF0
161#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
162#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
163#define GL_RECT_NV 0xF6
164#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
165#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
166#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
167#define GL_ARC_TO_NV 0xFE
168#define GL_RELATIVE_ARC_TO_NV 0xFF
169#define GL_BOLD_BIT_NV 0x01
170#define GL_ITALIC_BIT_NV 0x02
171#define GL_GLYPH_WIDTH_BIT_NV 0x01
172#define GL_GLYPH_HEIGHT_BIT_NV 0x02
173#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
174#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
175#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
176#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
177#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
178#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
179#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
180#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
181#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
182#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
183#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
184#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
185#define GL_FONT_ASCENDER_BIT_NV 0x00200000
186#define GL_FONT_DESCENDER_BIT_NV 0x00400000
187#define GL_FONT_HEIGHT_BIT_NV 0x00800000
188#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
189#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
190#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
191#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
192#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
193#define GL_PRIMARY_COLOR_NV 0x852C
194#define GL_SECONDARY_COLOR_NV 0x852D
195#define GL_ROUNDED_RECT_NV 0xE8
196#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9
197#define GL_ROUNDED_RECT2_NV 0xEA
198#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB
199#define GL_ROUNDED_RECT4_NV 0xEC
200#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED
201#define GL_ROUNDED_RECT8_NV 0xEE
202#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF
203#define GL_RELATIVE_RECT_NV 0xF7
204#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368
205#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369
206#define GL_FONT_UNAVAILABLE_NV 0x936A
207#define GL_FONT_UNINTELLIGIBLE_NV 0x936B
208#define GL_CONIC_CURVE_TO_NV 0x1A
209#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B
210#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000
211#define GL_STANDARD_FONT_FORMAT_NV 0x936C
212#define GL_2_BYTES_NV 0x1407
213#define GL_3_BYTES_NV 0x1408
214#define GL_4_BYTES_NV 0x1409
215#define GL_EYE_LINEAR_NV 0x2400
216#define GL_OBJECT_LINEAR_NV 0x2401
217#define GL_CONSTANT_NV 0x8576
218#define GL_PATH_PROJECTION_NV 0x1701
219#define GL_PATH_MODELVIEW_NV 0x1700
220#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3
221#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6
222#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36
223#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3
224#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4
225#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7
226#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38
227#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4
228#define GL_FRAGMENT_INPUT_NV 0x936D
229
230typedef GLuint (QOPENGLF_APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
231typedef void (QOPENGLF_APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
232typedef GLboolean (QOPENGLF_APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
233typedef void (QOPENGLF_APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
234typedef void (QOPENGLF_APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
235typedef void (QOPENGLF_APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
236typedef void (QOPENGLF_APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
237typedef void (QOPENGLF_APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
238typedef void (QOPENGLF_APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
239typedef void (QOPENGLF_APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
240typedef void (QOPENGLF_APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
241typedef void (QOPENGLF_APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
242typedef void (QOPENGLF_APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
243typedef void (QOPENGLF_APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
244typedef void (QOPENGLF_APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
245typedef void (QOPENGLF_APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
246typedef void (QOPENGLF_APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
247typedef void (QOPENGLF_APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
248typedef void (QOPENGLF_APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
249typedef void (QOPENGLF_APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
250typedef void (QOPENGLF_APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
251typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
252typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
253typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
254typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
255typedef void (QOPENGLF_APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
256typedef void (QOPENGLF_APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
257typedef void (QOPENGLF_APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
258typedef void (QOPENGLF_APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
259typedef void (QOPENGLF_APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
260typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
261typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
262typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
263typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
264typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
265typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
266typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
267typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
268typedef GLboolean (QOPENGLF_APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
269typedef GLboolean (QOPENGLF_APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
270typedef GLfloat (QOPENGLF_APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
271typedef GLboolean (QOPENGLF_APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
272typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
273typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
274typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
275typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m);
276typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
277typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m);
278typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
279typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
280typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
281typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
282typedef GLenum (QOPENGLF_APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]);
283typedef GLenum (QOPENGLF_APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
284typedef GLenum (QOPENGLF_APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
285typedef void (QOPENGLF_APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
286typedef void (QOPENGLF_APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
287#endif
288
289#ifndef GL_FLAT
290#define GL_FLAT 0x1D00
291#endif
292
293#ifndef GL_INVERT
294#define GL_INVERT 0x150A
295#endif
296
297// this one originates from fixed pipeline so may not be in GLES ext headers, but we need it still
298#ifndef GL_OBJECT_LINEAR_NV
299#define GL_OBJECT_LINEAR_NV 0x2401
300#endif
301
302#ifndef GL_EXT_direct_state_access
303typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
304typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
305#endif
306
307// When building on a system with GLES 2.0 or 3.0, we may still compile the NVPR
308// code path even though it's never used. Keep it compiling by defining the
309// necessary ES 3.1 separable program constants.
310#ifndef GL_FRAGMENT_SHADER_BIT
311#define GL_FRAGMENT_SHADER_BIT 0x00000002
312#endif
313#ifndef GL_UNIFORM
314#define GL_UNIFORM 0x92E1
315#endif
316
317class QQuickNvprFunctionsPrivate;
318
319class QQuickNvprFunctions
320{
321public:
322 QQuickNvprFunctions();
323 ~QQuickNvprFunctions();
324
325 static QSurfaceFormat format();
326 static bool isSupported();
327
328 bool create();
329
330 bool createFragmentOnlyPipeline(const char *fragmentShaderSource, GLuint *pipeline, GLuint *program);
331
332 PFNGLGENPATHSNVPROC genPaths = nullptr;
333 PFNGLDELETEPATHSNVPROC deletePaths = nullptr;
334 PFNGLISPATHNVPROC isPath = nullptr;
335 PFNGLPATHCOMMANDSNVPROC pathCommands = nullptr;
336 PFNGLPATHCOORDSNVPROC pathCoords = nullptr;
337 PFNGLPATHSUBCOMMANDSNVPROC pathSubCommands = nullptr;
338 PFNGLPATHSUBCOORDSNVPROC pathSubCoords = nullptr;
339 PFNGLPATHSTRINGNVPROC pathString = nullptr;
340 PFNGLPATHGLYPHSNVPROC pathGlyphs = nullptr;
341 PFNGLPATHGLYPHRANGENVPROC pathGlyphRange = nullptr;
342 PFNGLWEIGHTPATHSNVPROC weightPaths = nullptr;
343 PFNGLCOPYPATHNVPROC copyPath = nullptr;
344 PFNGLINTERPOLATEPATHSNVPROC interpolatePaths = nullptr;
345 PFNGLTRANSFORMPATHNVPROC transformPath = nullptr;
346 PFNGLPATHPARAMETERIVNVPROC pathParameteriv = nullptr;
347 PFNGLPATHPARAMETERINVPROC pathParameteri = nullptr;
348 PFNGLPATHPARAMETERFVNVPROC pathParameterfv = nullptr;
349 PFNGLPATHPARAMETERFNVPROC pathParameterf = nullptr;
350 PFNGLPATHDASHARRAYNVPROC pathDashArray = nullptr;
351 PFNGLPATHSTENCILFUNCNVPROC pathStencilFunc = nullptr;
352 PFNGLPATHSTENCILDEPTHOFFSETNVPROC pathStencilDepthOffset = nullptr;
353 PFNGLSTENCILFILLPATHNVPROC stencilFillPath = nullptr;
354 PFNGLSTENCILSTROKEPATHNVPROC stencilStrokePath = nullptr;
355 PFNGLSTENCILFILLPATHINSTANCEDNVPROC stencilFillPathInstanced = nullptr;
356 PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC stencilStrokePathInstanced = nullptr;
357 PFNGLPATHCOVERDEPTHFUNCNVPROC pathCoverDepthFunc = nullptr;
358 PFNGLCOVERFILLPATHNVPROC coverFillPath = nullptr;
359 PFNGLCOVERSTROKEPATHNVPROC coverStrokePath = nullptr;
360 PFNGLCOVERFILLPATHINSTANCEDNVPROC coverFillPathInstanced = nullptr;
361 PFNGLCOVERSTROKEPATHINSTANCEDNVPROC coverStrokePathInstanced = nullptr;
362 PFNGLGETPATHPARAMETERIVNVPROC getPathParameteriv = nullptr;
363 PFNGLGETPATHPARAMETERFVNVPROC getPathParameterfv = nullptr;
364 PFNGLGETPATHCOMMANDSNVPROC getPathCommands = nullptr;
365 PFNGLGETPATHCOORDSNVPROC getPathCoords = nullptr;
366 PFNGLGETPATHDASHARRAYNVPROC getPathDashArray = nullptr;
367 PFNGLGETPATHMETRICSNVPROC getPathMetrics = nullptr;
368 PFNGLGETPATHMETRICRANGENVPROC getPathMetricRange = nullptr;
369 PFNGLGETPATHSPACINGNVPROC getPathSpacing = nullptr;
370 PFNGLISPOINTINFILLPATHNVPROC isPointInFillPath = nullptr;
371 PFNGLISPOINTINSTROKEPATHNVPROC isPointInStrokePath = nullptr;
372 PFNGLGETPATHLENGTHNVPROC getPathLength = nullptr;
373 PFNGLPOINTALONGPATHNVPROC getPointAlongPath = nullptr;
374 PFNGLMATRIXLOAD3X2FNVPROC matrixLoad3x2f = nullptr;
375 PFNGLMATRIXLOAD3X3FNVPROC matrixLoad3x3f = nullptr;
376 PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC matrixLoadTranspose3x3f = nullptr;
377 PFNGLMATRIXMULT3X2FNVPROC matrixMult3x2f = nullptr;
378 PFNGLMATRIXMULT3X3FNVPROC matrixMult3x3f = nullptr;
379 PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC matrixMultTranspose3x3f = nullptr;
380 PFNGLSTENCILTHENCOVERFILLPATHNVPROC stencilThenCoverFillPath = nullptr;
381 PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC stencilThenCoverStrokePath = nullptr;
382 PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC stencilThenCoverFillPathInstanced = nullptr;
383 PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC stencilThenCoverStrokePathInstanced = nullptr;
384 PFNGLPATHGLYPHINDEXRANGENVPROC pathGlyphIndexRange = nullptr;
385 PFNGLPATHGLYPHINDEXARRAYNVPROC pathGlyphIndexArray = nullptr;
386 PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC pathMemoryGlyphIndexArray = nullptr;
387 PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC programPathFragmentInputGen = nullptr;
388 PFNGLGETPROGRAMRESOURCEFVNVPROC getProgramResourcefv = nullptr;
389
390 PFNGLMATRIXLOADFEXTPROC matrixLoadf = nullptr;
391 PFNGLMATRIXLOADIDENTITYEXTPROC matrixLoadIdentity = nullptr;
392
393private:
394 QQuickNvprFunctionsPrivate *d;
395};
396
397QT_END_NAMESPACE
398
399#endif // QT_CONFIG(opengl)
400
401#endif // QQUICKNVPRFUNCTIONS_P_H
402

source code of qtdeclarative/src/quickshapes/qquicknvprfunctions_p.h