summaryrefslogtreecommitdiffstats
path: root/src/render/backends/Qt3DSRenderBackend.h
blob: 4e9e17702a4f71de75d9a45c8de0d5043ce653d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
/****************************************************************************
**
** Copyright (C) 2008-2012 NVIDIA Corporation.
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt 3D Studio.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#pragma once
#ifndef QT3DS_RENDER_BACKEND_H
#define QT3DS_RENDER_BACKEND_H

/// @file Qt3DSRenderBackend.h
///       NVRender backend definition.

#include "foundation/Qt3DSAllocator.h"
#include "foundation/Qt3DSNoCopy.h"
#include "foundation/Qt3DSFoundation.h"
#include "foundation/Qt3DSBroadcastingAllocator.h"
#include "foundation/Qt3DSRefCounted.h"
#include "render/Qt3DSRenderBaseTypes.h"
#include "foundation/Qt3DSBounds3.h"
#include <EASTL/string.h>

#include <QtGui/qsurfaceformat.h>

namespace qt3ds {
namespace render {

#define HandleToID_cast(staticType, dynamicType, handle)                                           \
    static_cast<staticType>(reinterpret_cast<dynamicType>(handle))

    class NVRenderBackend : public NVRefCounted, public NoCopy
    {

    public:
        /// opaque buffer object handle
        typedef struct _NVRenderBackendBufferObject *NVRenderBackendBufferObject;
        /// opaque attribute layout object handle
        typedef struct _NVRenderBackendAttribLayoutObject *NVRenderBackendAttribLayoutObject;
        /// opaque input assembler object handle
        typedef struct _NVRenderBackendInputAssemblerObject *NVRenderBackendInputAssemblerObject;
        /// opaque texture object handle
        typedef struct _NVRenderBackendTextureObject *NVRenderBackendTextureObject;
        /// opaque sampler object handle
        typedef struct _NVRenderBackendSamplerObject *NVRenderBackendSamplerObject;
        /// opaque renderbuffer object handle
        typedef struct _NVRenderBackendRenderbufferObject *NVRenderBackendRenderbufferObject;
        /// opaque framebuffer object handle
        typedef struct _NVRenderBackendRenderTargetObject *NVRenderBackendRenderTargetObject;
        /// opaque vertex shader object handle
        typedef struct _NVRenderBackendVertexShaderObject *NVRenderBackendVertexShaderObject;
        /// opaque fragment shader object handle
        typedef struct _NVRenderBackendFragmentShaderObject *NVRenderBackendFragmentShaderObject;
        /// opaque tesselation control shader object handle
        typedef struct _NVRenderBackendTessControlShaderObject
            *NVRenderBackendTessControlShaderObject;
        /// opaque tesselation evaluation shader object handle
        typedef struct _NVRenderBackendTessEvaluationShaderObject
            *NVRenderBackendTessEvaluationShaderObject;
        /// opaque geometry shader object handle
        typedef struct _NVRenderBackendGeometryShaderObject *NVRenderBackendGeometryShaderObject;
        /// opaque compute shader object handle
        typedef struct _NVRenderBackendComputeShaderObject *NVRenderBackendComputeShaderObject;
        /// opaque shader program object handle
        typedef struct _NVRenderBackendShaderProgramObject *NVRenderBackendShaderProgramObject;
        /// opaque depth stencil state object handle
        typedef struct _NVRenderBackendDepthStencilStateObject
            *NVRenderBackendDepthStencilStateObject;
        /// opaque rasterizer state object handle
        typedef struct _NVRenderBackendRasterizerStateObject *NVRenderBackendRasterizerStateObject;
        /// opaque query object handle
        typedef struct _NVRenderBackendQueryObject *NVRenderBackendQueryObject;
        /// opaque sync object handle
        typedef struct _NVRenderBackendSyncObject *NVRenderBackendSyncObject;
        /// opaque sync object handle
        typedef struct _NVRenderBackendProgramPipeline *NVRenderBackendProgramPipeline;
        /// opaque sync object handle
        typedef struct _NVRenderBackendPathObject *NVRenderBackendPathObject;

        // backend capability caps
        typedef struct
        {
            enum Enum {
                ConstantBuffer, ///< Constant buffer support query
                DepthStencilTexture, ///< depth stencil texture format suport query
                DxtImages, ///< DXT image support query
                FpRenderTarget, ///< render to floating point target support query
                MsTexture, ///< Multisample texture support query
                TexSwizzle, ///< Texture swizzle support query
                FastBlits, ///< Hardware supports fast blits
                Tessellation, ///< Hardware supports tessellation
                Compute, ///< Hardware supports compute shader
                Geometry, ///< Hardware supports geometry shader
                SampleQuery, ///< Hardware supports query calls of type samples
                TimerQuery, ///< Hardware supports query calls of type timer
                CommandSync, ///< Hardware supports command sync object
                TextureArray, ///< Hardware supports texture arrays
                StorageBuffer, ///< Hardware supports shader storage buffers
                AtomicCounterBuffer, ///< Hardware supports atomic counter buffers
                ShaderImageLoadStore, ///< Hardware supports shader image load store operations
                ProgramPipeline, ///< Driver supports separate programs
                PathRendering, ///< Driver support path rendering
                AdvancedBlend, ///< Driver supports advanced blend modes
                BlendCoherency, ///< Hardware supports blend coherency
                gpuShader5, // for high precision sampling
                AdvancedBlendKHR, ///< Driver supports advanced blend modes
                VertexArrayObject,
                StandardDerivatives,
                TextureLod,
                BinaryProgram
            };
        } NVRenderBackendCaps;

        // backend queries
        typedef struct
        {
            enum Enum {
                MaxTextureSize, ///< Return max supported texture size
                MaxTextureArrayLayers, ///< Return max supported layer count for texture arrays
                MaxConstantBufferSlots, ///< Return max supported constant buffe slots for a single
                                        ///shader stage
                MaxConstantBufferBlockSize ///< Return max supported size for a single constant
                                           ///buffer block
            };
        } NVRenderBackendQuery;

        /// backend interface

        /**
         * @brief get the backend type
         *
         * @return true backend type
         */
        virtual NVRenderContextType GetRenderContextType() const = 0;

        /**
         * @brief get the version of the shading language
         * @return version string, must be copied by clients to be retained.
         */
        virtual const char *GetShadingLanguageVersion() = 0;

        /**
         * @brief get maximum supported texture image units that
 *	can be used to access texture maps from the vertex shader and the fragment processor
 *combined.
         *
         * @return max texture size
         */
        virtual QT3DSU32 GetMaxCombinedTextureUnits() = 0;

        /**
         * @brief query Backend capabilities
         *
         * @param[in] inCap		CAPS flag to query
         *						@ConstantBuffer, @DepthStencilTexture, ...
         *
         * @return true if supported
         */
        virtual bool GetRenderBackendCap(NVRenderBackendCaps::Enum inCap) const = 0;

        /**
         * @brief query Backend values
         *
         * @param[in] inQuery		Query flag to get value  for
         *							@MaxTextureSize, @MaxTextureArrayLayers,
         *...
         * @param[in/out] params	the query result is stored here
         *
         * @return no return
         */
        virtual void GetRenderBackendValue(NVRenderBackendQuery::Enum inQuery,
                                           QT3DSI32 *params) const = 0;

        /**
         * @brief query for bit depth of the depth buffer
         *
         * @return depth buffer bitplanes
         */
        virtual QT3DSU32 GetDepthBits() const = 0;

        /**
         * @brief query for bit depth of the stencil buffer
         *
         * @return stencil buffer bitplanes
         */
        virtual QT3DSU32 GetStencilBits() const = 0;

        /*
         * @brief set a backend rende state
         *
         * @param[in] bEnable	enable/disable state
         * @param[in] value		type of state
         *
         * @return no return
         */
        virtual void SetRenderState(bool bEnable, const NVRenderState::Enum value) = 0;

        /**
         * @brief get a backend rende state
         *
         * @param[in] value		type of state
         *
         * @return  true if state enabled otherwise false
         */
        virtual bool GetRenderState(const NVRenderState::Enum value) = 0;

        /**
         * @brief get current depth function
         *
         * @return  active depth function
         */
        virtual NVRenderBoolOp::Enum GetDepthFunc() = 0;

        /**
         * @brief create a depth stencil state object
         *
         * @param[in] enableDepth			enable depth test
         * @param[in] depthMask				enable depth writes
         * @param[in] depthFunc				depth compare function
         * @param[in] enableStencil			enable stencil test
         * @param[in] stencilFuncFront		stencil setup front faces
         * @param[in] stencilFuncBack		stencil setup back faces
         * @param[in] depthStencilOpFront	depth/stencil operations front faces
         * @param[in] depthStencilOpBack	depth/stencil operations back faces
         *
         * @return  opaque handle to state object
         */
        virtual NVRenderBackendDepthStencilStateObject
        CreateDepthStencilState(bool enableDepth, bool depthMask, NVRenderBoolOp::Enum depthFunc,
                                bool enableStencil,
                                NVRenderStencilFunctionArgument &stencilFuncFront,
                                NVRenderStencilFunctionArgument &stencilFuncBack,
                                NVRenderStencilOperationArgument &depthStencilOpFront,
                                NVRenderStencilOperationArgument &depthStencilOpBack) = 0;

        /**
         * @brief release a depth stencil state object
         *
         * @param[in] depthStencilState		pointer to state object
         *
         * @return  none
         */
        virtual void
        ReleaseDepthStencilState(NVRenderBackendDepthStencilStateObject depthStencilState) = 0;

        /**
         * @brief create a rasterizer state object
         *
         * @param[in] depthBias			any othe value than 0 enables depth bias
         * @param[in] depthScale		any othe value than 0 enables depth scale
         * @param[in] cullFace			select face to cull front or back
         *
         * @return  opaque handle to state object
         */
        virtual NVRenderBackendRasterizerStateObject
        CreateRasterizerState(QT3DSF32 depthBias, QT3DSF32 depthScale, NVRenderFaces::Enum cullFace) = 0;

        /**
         * @brief release a rasterizer state object
         *
         * @param[in] rasterizerState		pointer to state object
         *
         * @return  none
         */
        virtual void
        ReleaseRasterizerState(NVRenderBackendRasterizerStateObject rasterizerState) = 0;

        /**
         * @brief set depth stencil state
         *
         * @param[in] depthStencilState		pointer to state object
         *
         * @return  none
         */
        virtual void
        SetDepthStencilState(NVRenderBackendDepthStencilStateObject depthStencilState) = 0;

        /**
         * @brief set rasterizer state
         *
         * @param[in] rasterizerState		pointer to state object
         *
         * @return  none
         */
        virtual void SetRasterizerState(NVRenderBackendRasterizerStateObject rasterizerState) = 0;

        /**
         * @brief set current depth function
         *
         * @param[in] func		type of function
         *
         * @return no return
         */
        virtual void SetDepthFunc(const NVRenderBoolOp::Enum func) = 0;

        /**
         * @brief query if depth write is enabled
         *
         * @return true if enabled
         */
        virtual bool GetDepthWrite() = 0;

        /**
         * @brief enable / disable depth writes
         *
         * @param[in] bEnable	true for enable
         *
         * @return no return
         */
        virtual void SetDepthWrite(bool bEnable) = 0;

        /**
         * @brief enable / disable color channel writes
         *
         * @param[in] bRed		true for enable red channel
         * @param[in] bGreen	true for enable green channel
         * @param[in] bBlue		true for enable blue channel
         * @param[in] bAlpha	true for enable alpha channel
         *
         * @return no return
         */
        virtual void SetColorWrites(bool bRed, bool bGreen, bool bBlue, bool bAlpha) = 0;

        /**
         * @brief enable / disable multisample rendering
         *
         * @param[in] bEnable	true for enable
         *
         * @return no return
         */
        virtual void SetMultisample(bool bEnable) = 0;

        /**
         * @brief query blend functions
         *
         * @param[out] pBlendFuncArg	blending functions
         *
         * @return no return
         */
        virtual void GetBlendFunc(NVRenderBlendFunctionArgument *pBlendFuncArg) = 0;

        /**
         * @brief set blend functions
         *
         * @param[in] pBlendFuncArg	blending functions
         *
         * @return no return
         */
        virtual void SetBlendFunc(const NVRenderBlendFunctionArgument &blendFuncArg) = 0;

        /**
         * @brief set blend equation
         *
         * @param[in] pBlendEquArg	blending equation
         *
         * @return no return
         */
        virtual void SetBlendEquation(const NVRenderBlendEquationArgument &pBlendEquArg) = 0;

        /**
         * @brief guarantee blend coherency
         *
         *
         * @return no return
         */
        virtual void SetBlendBarrier(void) = 0;

        /**
         * @brief query scissor rectangle
         *
         * @param[out] pRect	contains scissor rect
         *
         * @return no return
         */
        virtual void GetScissorRect(NVRenderRect *pRect) = 0;

        /**
        * @brief set scissor rectangle
        *
        * @param[out] pRect	contains scissor rect
        *
        * @return no return
        */
        virtual void SetScissorRect(const NVRenderRect &rect) = 0;

        /**
         * @brief query viewport rectangle
         *
         * @param[out] pRect	contains viewport rect
         *
         * @return no return
         */
        virtual void GetViewportRect(NVRenderRect *pRect) = 0;

        /**
         * @brief set viewport rectangle
         *
         * @param[out] pRect	contains viewport rect
         *
         * @return no return
         */
        virtual void SetViewportRect(const NVRenderRect &rect) = 0;

        /**
         * @brief query viewport rectangle
         *
         * @param[in] clearColor	clear color
         *
         * @return no return
         */
        virtual void SetClearColor(const QT3DSVec4 *pClearColor) = 0;

        /**
         * @brief query viewport rectangle
         *
         * @param[in] flags	clear flags
         *
         * @return no return
         */
        virtual void Clear(NVRenderClearFlags flags) = 0;

        /**
         * @brief create a buffer object
         *
         * @param[in] size			Size of the buffer
         * @param[in] bindFlags		Where to bind this buffer (e.g. vertex, index, ...)
         *							For OpenGL this should be a single
         *value
         * @param[in] usage			Usage of the buffer (e.g. static, dynamic...)
         * @param[in] hostPtr       A pointer to the buffer data that is allocated by the
         *application.
         *
         * @return The created buffer object or NULL if the creation failed.
         */
        virtual NVRenderBackendBufferObject CreateBuffer(size_t size,
                                                         NVRenderBufferBindFlags bindFlags,
                                                         NVRenderBufferUsageType::Enum usage,
                                                         const void *hostPtr = NULL) = 0;

        /**
         * @brief bind a buffer object
         *
         * @param[in] bo			Pointer to buffer object
         * @param[in] bindFlags		Where to bind this buffer (e.g. vertex, index, ...)
         *							For OpenGL this should be a single
         *value
         *
         * @return no return.
         */
        virtual void BindBuffer(NVRenderBackendBufferObject bo,
                                NVRenderBufferBindFlags bindFlags) = 0;

        /**
         * @brief Release a single buffer object
         *
         * @param[in] bo			Pointer to buffer object
         *
         * @return no return.
         */
        virtual void ReleaseBuffer(NVRenderBackendBufferObject bo) = 0;

        /**
         * @brief update a whole buffer object
         *
         * @param[in] bo			Pointer to buffer object
         * @param[in] bindFlags		Where to bind this buffer (e.g. vertex, index, ...)
         *							For OpenGL this should be a single
         *value
         * @param[in] size			Size of the data buffer
         * @param[in] usage			Usage of the buffer (e.g. static, dynamic...)
         * @param[in] data			A pointer to the buffer data that is allocated by the
         *application.
         *
         * @return no return.
         */
        virtual void UpdateBuffer(NVRenderBackendBufferObject bo, NVRenderBufferBindFlags bindFlags,
                                  size_t size, NVRenderBufferUsageType::Enum usage,
                                  const void *data) = 0;

        /**
         * @brief update a range of a buffer object
         *
         * @param[in] bo			Pointer to buffer object
         * @param[in] bindFlags		Where to bind this buffer (e.g. vertex, index, ...)
         *							For OpenGL this should be a single
         *value
         * @param[in] size			Size of the data buffer
         * @param[in] usage			Usage of the buffer (e.g. static, dynamic...)
         * @param[in] data			A pointer to the buffer data that is allocated by the
         *application.
         *
         * @return no return.
         */
        virtual void UpdateBufferRange(NVRenderBackendBufferObject bo,
                                       NVRenderBufferBindFlags bindFlags, size_t offset,
                                       size_t size, const void *data) = 0;

        /**
         * @brief Get a pointer to the buffer data ( GL(ES) >= 3 only )
         *
         * @param[in] bo			Pointer to buffer object
         * @param[in] bindFlags		Where to bind this buffer (e.g. vertex, index, ...)
         *							For OpenGL this should be a single
         *value
         * @param[in] offset		Byte offset into the data buffer
         * @param[in] length		Byte length of mapping size
         * @param[in] access		Access of the buffer (e.g. read, write, ...)
         *
         * @return pointer to mapped data or null.
         */
        virtual void *MapBuffer(NVRenderBackendBufferObject bo, NVRenderBufferBindFlags bindFlags,
                                size_t offset, size_t length,
                                NVRenderBufferAccessFlags accessFlags) = 0;

        /**
         * @brief Unmap a previously mapped buffer ( GL(ES) >= 3 only )
         *		  This functions transfers the content to the hardware buffer
         *
         * @param[in] bo			Pointer to buffer object
         * @param[in] bindFlags		Where to bind this buffer (e.g. vertex, index, ...)
         *							For OpenGL this should be a single
         *value
         *
         * @return true if successful
         */
        virtual bool UnmapBuffer(NVRenderBackendBufferObject bo,
                                 NVRenderBufferBindFlags bindFlags) = 0;

        /**
         * @brief Set a memory barrier
         *
         * @param[in] barriers		Flags for barriers
         *
         * @return no return.
         */
        virtual void SetMemoryBarrier(NVRenderBufferBarrierFlags barriers) = 0;

        /**
         * @brief create a query object
         *
         * @return The created query object or NULL if the creation failed.
         */
        virtual NVRenderBackendQueryObject CreateQuery() = 0;

        /**
         * @brief delete query objects
         *
         * @param[in] qo		Handle to query object
         *
         * @return  no return
         */
        virtual void ReleaseQuery(NVRenderBackendQueryObject qo) = 0;

        /**
         * @brief Start query recording
         *
         * @param[in] qo		Handle to query object
         * @param[in] type		Type of query
         *
         * @return  no return
         */
        virtual void BeginQuery(NVRenderBackendQueryObject qo, NVRenderQueryType::Enum type) = 0;

        /**
         * @brief End query recording
         *
         * @param[in] qo		Handle to query object
         * @param[in] type		Type of query
         *
         * @return  no return
         */
        virtual void EndQuery(NVRenderBackendQueryObject qo, NVRenderQueryType::Enum type) = 0;

        /**
         * @brief Get a query result
         *
         * @param[in]  qo		Handle to query object
         * @param[in]  type		Type of query
         * @param[out] params	Contains result of query regarding query type
         *
         * @return  no return
         */
        virtual void GetQueryResult(NVRenderBackendQueryObject qo,
                                    NVRenderQueryResultType::Enum resultType, QT3DSU32 *params) = 0;

        /**
         * @brief Get a query result
         *
         * @param[in]  qo		Handle to query object
         * @param[in]  type		Type of query
         * @param[out] params	Contains result of query regarding query type 64 bit returns
         *
         * @return  no return
         */
        virtual void GetQueryResult(NVRenderBackendQueryObject qo,
                                    NVRenderQueryResultType::Enum resultType, QT3DSU64 *params) = 0;

        /**
         * @brief Record the GPU time using the query object
         *
         * @param[in]  qo		Handle to query object
         *
         * @return  no return
         */
        virtual void SetQueryTimer(NVRenderBackendQueryObject qo) = 0;

        /**
         * @brief create a sync object and place it in the command queue
         *
         * @param[in] tpye			Type to sync
         * @param[in] syncFlags		Currently unused
         *
         * @return The created sync object or NULL if the creation failed.
         */
        virtual NVRenderBackendSyncObject CreateSync(NVRenderSyncType::Enum tpye,
                                                     NVRenderSyncFlags syncFlags) = 0;

        /**
         * @brief delete sync object
         *
         * @param[in] so		Handle to sync object
         *
         * @return  no return
         */
        virtual void ReleaseSync(NVRenderBackendSyncObject so) = 0;

        /**
         * @brief wait for sync object to be signaled
         *
         * @param[in] so			Handle to sync object
         * @param[in] syncFlags		Currently unused
         * @param[in] timeout		Currently ignored
         *
         * @return  no return
         */
        virtual void WaitSync(NVRenderBackendSyncObject so, NVRenderCommandFlushFlags syncFlags,
                              QT3DSU64 timeout) = 0;

        /**
         * @brief create a render target object
         *
         *
         * @return The created render target object or NULL if the creation failed.
         */
        virtual NVRenderBackendRenderTargetObject CreateRenderTarget() = 0;

        /**
         * @brief Release a single render target object
         *
         * @param[in] rto			Pointer to render target object
         *
         * @return no return.
         */
        virtual void ReleaseRenderTarget(NVRenderBackendRenderTargetObject rto) = 0;

        /**
         * @brief Attach a renderbuffer object to the framebuffer
         *
         * @param[in] rto			Pointer to render target object
         * @param[in] attachment	Attachment point (e.g COLOR0, DEPTH)
         * @param[in] rbo			Pointer to renderbuffer object
         *
         * @return no return.
         */
        virtual void RenderTargetAttach(NVRenderBackendRenderTargetObject rto,
                                        NVRenderFrameBufferAttachments::Enum attachment,
                                        NVRenderBackendRenderbufferObject rbo) = 0;

        /**
         * @brief Attach a texture object to the render target
         *
         * @param[in] rto			Pointer to render target object
         * @param[in] attachment	Attachment point (e.g COLOR0, DEPTH)
         * @param[in] to			Pointer to texture object
         * @param[in] target		Attachment texture target
         *
         * @return no return.
         */
        virtual void RenderTargetAttach(
            NVRenderBackendRenderTargetObject rto, NVRenderFrameBufferAttachments::Enum attachment,
            NVRenderBackendTextureObject to,
            NVRenderTextureTargetType::Enum target = NVRenderTextureTargetType::Texture2D) = 0;

        /**
         * @brief Attach a texture object to the render target
         *
         * @param[in] rto			Pointer to render target object
         * @param[in] attachment	Attachment point (e.g COLOR0, DEPTH)
         * @param[in] to			Pointer to texture object
         * @param[in] level			Texture mip level
         * @param[in] layer			Texture layer or slice
         *
         * @return no return.
         */
        virtual void RenderTargetAttach(NVRenderBackendRenderTargetObject rto,
                                        NVRenderFrameBufferAttachments::Enum attachment,
                                        NVRenderBackendTextureObject to, QT3DSI32 level,
                                        QT3DSI32 layer) = 0;

        /**
         * @brief Make a render target active
         *
         * @param[in] rto			Pointer to render target object
         *
         * @return no return.
         */
        virtual void SetRenderTarget(NVRenderBackendRenderTargetObject rto) = 0;

        /**
         * @brief Check if a render target is ready for render
         *
         * @param[in] rto			Pointer to render target object
         *
         * @return true if usable.
         */
        virtual bool RenderTargetIsValid(NVRenderBackendRenderTargetObject rto) = 0;

        /**
         * @brief Make a render target active for reading
         *
         * @param[in] rto			Pointer to render target object
         *
         * @return no return.
         */
        virtual void SetReadTarget(NVRenderBackendRenderTargetObject rto) = 0;

        /**
         * @brief Set active buffers for drawing
         *
         * @param[in] rto				Pointer to render target object
         * @param[in] inDrawBufferSet	Pointer to array of enabled render targets
         *
         * @return no return.
         */
        virtual void SetDrawBuffers(NVRenderBackendRenderTargetObject rto,
                                    NVConstDataRef<QT3DSI32> inDrawBufferSet) = 0;

        /**
         * @brief Set active buffer for reading
         *
         * @param[in] rto				Pointer to render target object
         * @param[in] inReadFace		Buffer to read from
         *
         * @return no return.
         */
        virtual void SetReadBuffer(NVRenderBackendRenderTargetObject rto,
                                   NVReadFaces::Enum inReadFace) = 0;

        /**
         * @brief Copy framebuffer attachments. Source is set with SetReadTarget dest with
         * SetRenderTarget
         *
         * @param[in] srcX0				Lower left X coord of source rectangle
         * @param[in] srcY0				Lower left Y coord of source rectangle
         * @param[in] srcX1				Upper right X coord of source rectangle
         * @param[in] srcY1				Upper right Y coord of source rectangle
         * @param[in] dstX0				Lower left X coord of dest rectangle
         * @param[in] dstY0				Lower left Y coord of dest rectangle
         * @param[in] dstX1				Upper right X coord of dest rectangle
         * @param[in] dstY1				Upper right Y coord of dest rectangle
         * @param[in] inDrawBufferSet	pointer to array of enabled render targets
         * @param[in] filter			Copy filter method (NEAREST or LINEAR)
         *
         * @return no return.
         */
        virtual void BlitFramebuffer(QT3DSI32 srcX0, QT3DSI32 srcY0, QT3DSI32 srcX1, QT3DSI32 srcY1,
                                     QT3DSI32 dstX0, QT3DSI32 dstY0, QT3DSI32 dstX1, QT3DSI32 dstY1,
                                     NVRenderClearFlags flags,
                                     NVRenderTextureMagnifyingOp::Enum filter) = 0;

        /**
         * @brief create a render buffer object
         *
         * @param[in] storageFormat	Format of the buffer
         * @param[in] width			Buffer with
         * @param[in] height		Buffer height
         *
         * @return The created render buffer object or NULL if the creation failed.
         */
        virtual NVRenderBackendRenderbufferObject
        CreateRenderbuffer(NVRenderRenderBufferFormats::Enum storageFormat, size_t width,
                           size_t height) = 0;

        /**
         * @brief Release a single renderbuffer object
         *
         * @param[in] bo			Pointer to renderbuffer object
         *
         * @return no return.
         */
        virtual void ReleaseRenderbuffer(NVRenderBackendRenderbufferObject rbo) = 0;

        /**
         * @brief resize a render buffer object
         *
         * @param[in] storageFormat	Format of the buffer
         * @param[in] width			Buffer with
         * @param[in] height		Buffer height
         *
         * @return True on success
         */
        virtual bool ResizeRenderbuffer(NVRenderBackendRenderbufferObject rbo,
                                        NVRenderRenderBufferFormats::Enum storageFormat,
                                        size_t width, size_t height) = 0;

        /**
         * @brief create a texture object
         *
         * @return The created texture object or NULL if the creation failed..
         */
        virtual NVRenderBackendTextureObject CreateTexture() = 0;

        /**
         * @brief set texture data for a 2D texture
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D, 3D
         * @param[in] level				Texture mip level
         * @param[in] internalFormat	format of the texture
         * @param[in] width				texture width
         * @param[in] height			texture height
         * @param[in] border			border
         * @param[in] format			format of provided pixel data
         * @param[in] hostPtr			A pointer to the buffer data that is allocated by the
         * application.
         *
         * @return No return
         */
        virtual void SetTextureData2D(NVRenderBackendTextureObject to,
                                      NVRenderTextureTargetType::Enum target, QT3DSU32 level,
                                      NVRenderTextureFormats::Enum internalFormat, size_t width,
                                      size_t height, QT3DSI32 border,
                                      NVRenderTextureFormats::Enum format,
                                      const void *hostPtr = NULL) = 0;

        /**
         * @brief set texture data for the face of a Cube map
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target face
         * @param[in] level				Texture mip level
         * @param[in] internalFormat	format of the texture
         * @param[in] width				texture width
         * @param[in] height			texture height
         * @param[in] border			border
         * @param[in] format			format of provided pixel data
         * @param[in] hostPtr			A pointer to the buffer data that is allocated by the
         * application.
         *
         * @return No return
         */
        virtual void SetTextureDataCubeFace(NVRenderBackendTextureObject to,
                                            NVRenderTextureTargetType::Enum target, QT3DSU32 level,
                                            NVRenderTextureFormats::Enum internalFormat,
                                            size_t width, size_t height, QT3DSI32 border,
                                            NVRenderTextureFormats::Enum format,
                                            const void *hostPtr = NULL) = 0;

        /**
         * @brief create a storage for a 2D texture including mip levels
         *		  Note that this makes texture immutable in size and format
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D, 3D
         * @param[in] levels			Texture mip level count
         * @param[in] internalFormat	format of the texture
         * @param[in] width				texture width
         * @param[in] height			texture height
         *
         * @return No return
         */
        virtual void CreateTextureStorage2D(NVRenderBackendTextureObject to,
                                            NVRenderTextureTargetType::Enum target, QT3DSU32 levels,
                                            NVRenderTextureFormats::Enum internalFormat,
                                            size_t width, size_t height) = 0;

        /**
         * @brief set texture sub data for a 2D texture
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D, 3D
         * @param[in] level				Texture mip level
         * @param[in] xOffset			Texture x offset
         * @param[in] yOffset			Texture y offset
         * @param[in] width				Texture width
         * @param[in] height			Texture height
         * @param[in] border			border
         * @param[in] format			format of texture
         * @param[in] hostPtr			A pointer to the buffer data that is allocated by the
         * application.
         *
         * @return No return
         */
        virtual void SetTextureSubData2D(NVRenderBackendTextureObject to,
                                         NVRenderTextureTargetType::Enum target, QT3DSU32 level,
                                         QT3DSI32 xOffset, QT3DSI32 yOffset, size_t width, size_t height,
                                         NVRenderTextureFormats::Enum format,
                                         const void *hostPtr = NULL) = 0;

        /**
         * @brief set compressed texture data for a 2D texture
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D, 3D
         * @param[in] level				Texture mip level
         * @param[in] internalFormat	format of the texture
         * @param[in] width				texture width
         * @param[in] height			texture height
         * @param[in] border			border
         * @param[in] imageSize			image size in bytes located at hostPtr
         * @param[in] hostPtr			A pointer to the buffer data that is allocated by the
         * application.
         *
         * @return No return
         */
        virtual void SetCompressedTextureData2D(NVRenderBackendTextureObject to,
                                                NVRenderTextureTargetType::Enum target, QT3DSU32 level,
                                                NVRenderTextureFormats::Enum internalFormat,
                                                size_t width, size_t height, QT3DSI32 border,
                                                size_t imageSize, const void *hostPtr = NULL) = 0;

        /**
         * @brief set compressed texture data for a Cubemap face
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D, 3D
         * @param[in] level				Texture mip level
         * @param[in] internalFormat	format of the texture
         * @param[in] width				texture width
         * @param[in] height			texture height
         * @param[in] border			border
         * @param[in] imageSize			image size in bytes located at hostPtr
         * @param[in] hostPtr			A pointer to the buffer data that is allocated by the
         * application.
         *
         * @return No return
         */
        virtual void SetCompressedTextureDataCubeFace(
            NVRenderBackendTextureObject to, NVRenderTextureTargetType::Enum target, QT3DSU32 level,
            NVRenderTextureFormats::Enum internalFormat, size_t width, size_t height, QT3DSI32 border,
            size_t imageSize, const void *hostPtr = NULL) = 0;

        /**
         * @brief set compressed texture sub data for a 2D texture
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D, 3D
         * @param[in] level				Texture mip level
         * @param[in] xOffset			Texture x offset
         * @param[in] yOffset			Texture y offset
         * @param[in] width				texture width
         * @param[in] height			texture height
         * @param[in] format			format of provided pixel data
         * @param[in] imageSize			image size in bytes located at hostPtr
         * @param[in] hostPtr			A pointer to the buffer data that is allocated by the
         * application.
         *
         * @return No return
         */
        virtual void SetCompressedTextureSubData2D(
            NVRenderBackendTextureObject to, NVRenderTextureTargetType::Enum target, QT3DSU32 level,
            QT3DSI32 xOffset, QT3DSI32 yOffset, size_t width, size_t height,
            NVRenderTextureFormats::Enum format, size_t imageSize, const void *hostPtr = NULL) = 0;

        /**
         * @brief establish a multisampled 2D texture
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D MS
         * @param[in] samples			Textures sample count
         * @param[in] internalFormat	Format of the texture
         * @param[in] width				Texture width
         * @param[in] height			Texture height
         * @param[in] bool				Fixed sample locations
         *
         * @return No return
         */
        virtual void SetMultisampledTextureData2D(NVRenderBackendTextureObject to,
                                                  NVRenderTextureTargetType::Enum target,
                                                  size_t samples,
                                                  NVRenderTextureFormats::Enum internalFormat,
                                                  size_t width, size_t height,
                                                  bool fixedsamplelocations) = 0;

        /**
         * @brief set texture data for a 3D texture or 2D texture array
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D, 3D
         * @param[in] level				Texture mip level
         * @param[in] internalFormat	format of the texture
         * @param[in] width				texture width
         * @param[in] height			texture height
         * @param[in] depth				texture depth or slice count
         * @param[in] border			border
         * @param[in] format			format of provided pixel data
         * @param[in] hostPtr			A pointer to the buffer data that is allocated by the
         * application.
         *
         * @return No return
         */
        virtual void SetTextureData3D(NVRenderBackendTextureObject to,
                                      NVRenderTextureTargetType::Enum target, QT3DSU32 level,
                                      NVRenderTextureFormats::Enum internalFormat, size_t width,
                                      size_t height, size_t depth, QT3DSI32 border,
                                      NVRenderTextureFormats::Enum format,
                                      const void *hostPtr = NULL) = 0;

        /**
         * @brief generate mipmap levels
         *
         * @param[in] to				Pointer to texture object
         * @param[in] target			Texture target 2D,...
         * @param[in] hint				How to generate mips (Nicest)
         *
         * @return No return
         */
        virtual void GenerateMipMaps(NVRenderBackendTextureObject to,
                                     NVRenderTextureTargetType::Enum target,
                                     NVRenderHint::Enum genType) = 0;

        /**
         * @brief bind a texture object
         *
         * @param[in] to			Pointer to texture object
         * @param[in] target		Where to bind this texture (e.g. 2D, 3D, ...)
         * @param[in] unit			Which unit to bind this texture
         *
         * @return no return.
         */
        virtual void BindTexture(NVRenderBackendTextureObject to,
                                 NVRenderTextureTargetType::Enum target, QT3DSU32 unit) = 0;

        /**
         * @brief bind a image/texture object
         *
         * @param[in] to			Pointer to texture object
         * @param[in] unit			Which unit to bind this texture
         * @param[in] level			Which level to bind
         * @param[in] layered		Bind layered texture (cube map, array,... )
         * @param[in] level			Specify layer. Only valid of layered=false.
         * @param[in] access		Access mode ( read, write, read-write )
         * @param[in] format		Texture format must be compatible with Image format
         *
         * @return no return.
         */
        virtual void BindImageTexture(NVRenderBackendTextureObject to, QT3DSU32 unit, QT3DSI32 level,
                                      bool layered, QT3DSI32 layer,
                                      NVRenderImageAccessType::Enum accessFlags,
                                      NVRenderTextureFormats::Enum format) = 0;

        /**
         * @brief Release a single texture object
         *
         * @param[in] to			Pointer to buffer object
         *
         * @return no return.
         */
        virtual void ReleaseTexture(NVRenderBackendTextureObject to) = 0;

        /**
         * @brief query texture swizzle mode
         *		  This is mainly for luminance, alpha replacement with R8 formats
         *
         * @param[in]  inFormat			input texture format to check
         *
         * @return texture swizzle mode
         */
        virtual NVRenderTextureSwizzleMode::Enum
        GetTextureSwizzleMode(const NVRenderTextureFormats::Enum inFormat) const = 0;

        /**
         * @ brief create a sampler
         *
         * @param[in] minFilter		Texture min filter
         * @param[in] magFilter		Texture mag filter
         * @param[in] wrapS			Texture coord generation for S
         * @param[in] wrapT			Texture coord generation for T
         * @param[in] wrapR			Texture coord generation for R
         * @param[in] minLod		Texture min level of detail
         * @param[in] maxLod		Texture max level of detail
         * @param[in] lodBias		Texture level of detail example
         * @param[in] compareMode	Texture compare mode
         * @param[in] compareFunc	Texture compare function
         * @param[in] anisoFilter	Aniso filter value [1.0, 16.0]
         * @param[in] borderColor	Texture border color float[4]
         *
         * @return The created sampler object or NULL if the creation failed.
         */
        virtual NVRenderBackendSamplerObject CreateSampler(
            NVRenderTextureMinifyingOp::Enum minFilter = NVRenderTextureMinifyingOp::Linear,
            NVRenderTextureMagnifyingOp::Enum magFilter = NVRenderTextureMagnifyingOp::Linear,
            NVRenderTextureCoordOp::Enum wrapS = NVRenderTextureCoordOp::ClampToEdge,
            NVRenderTextureCoordOp::Enum wrapT = NVRenderTextureCoordOp::ClampToEdge,
            NVRenderTextureCoordOp::Enum wrapR = NVRenderTextureCoordOp::ClampToEdge,
            QT3DSI32 minLod = -1000, QT3DSI32 maxLod = 1000, QT3DSF32 lodBias = 0.0,
            NVRenderTextureCompareMode::Enum compareMode = NVRenderTextureCompareMode::NoCompare,
            NVRenderTextureCompareOp::Enum compareFunc = NVRenderTextureCompareOp::LessThanOrEqual,
            QT3DSF32 anisotropy = 1.0, QT3DSF32 *borderColor = NULL) = 0;

        /**
         * @ brief update a sampler
         *
         * @param[in] so			Pointer to sampler object
         * @param[in] target		Texture target 2D, 3D
         * @param[in] minFilter		Texture min filter
         * @param[in] magFilter		Texture mag filter
         * @param[in] wrapS			Texture coord generation for S
         * @param[in] wrapT			Texture coord generation for T
         * @param[in] wrapR			Texture coord generation for R
         * @param[in] minLod		Texture min level of detail
         * @param[in] maxLod		Texture max level of detail
         * @param[in] lodBias		Texture level of detail bias (unused)
         * @param[in] compareMode	Texture compare mode
         * @param[in] compareFunc	Texture compare function
         * @param[in] anisoFilter	Aniso filter value [1.0, 16.0]
         * @param[in] borderColor	Texture border color float[4] (unused)
         *
         * @return No return
         */
        virtual void UpdateSampler(
            NVRenderBackendSamplerObject so, NVRenderTextureTargetType::Enum target,
            NVRenderTextureMinifyingOp::Enum minFilter = NVRenderTextureMinifyingOp::Linear,
            NVRenderTextureMagnifyingOp::Enum magFilter = NVRenderTextureMagnifyingOp::Linear,
            NVRenderTextureCoordOp::Enum wrapS = NVRenderTextureCoordOp::ClampToEdge,
            NVRenderTextureCoordOp::Enum wrapT = NVRenderTextureCoordOp::ClampToEdge,
            NVRenderTextureCoordOp::Enum wrapR = NVRenderTextureCoordOp::ClampToEdge,
            QT3DSF32 minLod = -1000.0, QT3DSF32 maxLod = 1000.0, QT3DSF32 lodBias = 0.0,
            NVRenderTextureCompareMode::Enum compareMode = NVRenderTextureCompareMode::NoCompare,
            NVRenderTextureCompareOp::Enum compareFunc = NVRenderTextureCompareOp::LessThanOrEqual,
            QT3DSF32 anisotropy = 1.0, QT3DSF32 *borderColor = NULL) = 0;

        /**
         * @ brief Update a textures swizzle mode
         *
         * @param[in] so			Pointer to texture object
         * @param[in] target		Texture target 2D, 3D
         * @param[in] swizzleMode	Texture swizzle mode
         *
         * @return No return
         */
        virtual void UpdateTextureSwizzle(NVRenderBackendTextureObject to,
                                          NVRenderTextureTargetType::Enum target,
                                          NVRenderTextureSwizzleMode::Enum swizzleMode) = 0;

        /**
         * @ brief Update state belonging to a texture object
         *
         * @param[in] so			Pointer to texture object
         * @param[in] target		Texture target 2D, 3D, Cube
         * @param[in] baseLevel		Texture base level
         * @param[in] maxLevel		Texture max level
         *
         * @return No return
         */
        virtual void UpdateTextureObject(NVRenderBackendTextureObject to,
                                         NVRenderTextureTargetType::Enum target, QT3DSI32 baseLevel,
                                         QT3DSI32 maxLevel) = 0;

        /**
         * @brief Release a single sampler object
         *
         * @param[in] so			Pointer to sampler object
         *
         * @return no return.
         */
        virtual void ReleaseSampler(NVRenderBackendSamplerObject so) = 0;

        /**
         * @brief create a attribute layout object
         *
         * @param[in] attribs	Array off vertex attributes.
         *
         * @return The created attribute layout object or NULL if the creation failed.
         */
        virtual NVRenderBackendAttribLayoutObject
        CreateAttribLayout(NVConstDataRef<NVRenderVertexBufferEntry> attribs) = 0;

        /**
         * @brief Release a attribute layoutr object
         *
         * @param[in] ao			Pointer to attribute layout object
         *
         * @return no return.
         */
        virtual void ReleaseAttribLayout(NVRenderBackendAttribLayoutObject ao) = 0;

        /**
         * @brief create a input assembler object
         *
         * @param[in] attribLayout		Pointer to NVRenderBackendAttribLayoutObject object
         * @param[in] buffers			list of vertex buffers
         * @param[in] indexBuffer		index buffer object
         * @param[in] strides			list of strides of the buffer
         * @param[in] offsets			list of offsets into the buffer
         * @param[in] patchVertexCount	vertext count for a patch. Only valid for patch primitives
         *
         * @return The created input assembler object or NULL if the creation failed.
         */
        virtual NVRenderBackendInputAssemblerObject
        CreateInputAssembler(NVRenderBackendAttribLayoutObject attribLayout,
                             NVConstDataRef<NVRenderBackendBufferObject> buffers,
                             const NVRenderBackendBufferObject indexBuffer,
                             NVConstDataRef<QT3DSU32> strides, NVConstDataRef<QT3DSU32> offsets,
                             QT3DSU32 patchVertexCount) = 0;

        /**
         * @brief Release a input assembler object
         *
         * @param[in] iao					Pointer to attribute layout object
         *
         * @return no return.
         */
        virtual void ReleaseInputAssembler(NVRenderBackendInputAssemblerObject iao) = 0;

        /**
         * @brief Set a input assembler object.
         *		  This setup the render engine vertex assmebly
         *
         * @param[in] iao					Pointer to attribute layout object
         * @param[in] po					Pointer program object
         *
         * @return false if it fails.
         */
        virtual bool SetInputAssembler(NVRenderBackendInputAssemblerObject iao,
                                       NVRenderBackendShaderProgramObject po) = 0;

        /**
         * @brief Set the per patch vertex count
         *
         * @param[in] iao					Pointer to attribute layout object
         * @param[in] count					Count of vertices per patch
         *
         * @return false if it fails.
         */
        virtual void SetPatchVertexCount(NVRenderBackendInputAssemblerObject iao, QT3DSU32 count) = 0;

        /**
         * @brief create a vertex shader object
         *
         * @param[in] source			Pointer to shader source
         * @param[in/out] errorMessage	Pointer to copy the error message
         * @param[in] binary			True if the source is actually a binary program
         *
         * @return The created vertex shader object or NULL if the creation failed.
         */
        virtual NVRenderBackendVertexShaderObject CreateVertexShader(NVConstDataRef<QT3DSI8> source,
                                                                     eastl::string &errorMessage,
                                                                     bool binary) = 0;

        /**
         * @brief release a vertex shader object
         *
         * @param[in] vso		Pointer to vertex shader object
         *
         * @return No Return.
         */
        virtual void ReleaseVertexShader(NVRenderBackendVertexShaderObject vso) = 0;

        /**
         * @brief create a fragment shader object
         *
         * @param[in] source			Pointer to shader source
         * @param[in/out] errorMessage	Pointer to copy the error message
         * @param[in] binary			True if the source is actually a binary program
         *
         * @return The created vertex shader object or NULL if the creation failed.
         */
        virtual NVRenderBackendFragmentShaderObject
        CreateFragmentShader(NVConstDataRef<QT3DSI8> source, eastl::string &errorMessage,
                             bool binary) = 0;

        /**
         * @brief release a fragment shader object
         *
         * @param[in] vso		Pointer to fragment shader object
         *
         * @return No Return.
         */
        virtual void ReleaseFragmentShader(NVRenderBackendFragmentShaderObject fso) = 0;

        /**
         * @brief create a tessellation control shader object
         *
         * @param[in] source			Pointer to shader source
         * @param[in/out] errorMessage	Pointer to copy the error message
         * @param[in] binary			True if the source is actually a binary program
         *
         * @return The created tessellation control shader object or NULL if the creation failed.
         */
        virtual NVRenderBackendTessControlShaderObject
        CreateTessControlShader(NVConstDataRef<QT3DSI8> source, eastl::string &errorMessage,
                                bool binary) = 0;

        /**
         * @brief release a tessellation control shader object
         *
         * @param[in] tcso		Pointer to tessellation control shader object
         *
         * @return No Return.
         */
        virtual void ReleaseTessControlShader(NVRenderBackendTessControlShaderObject tcso) = 0;

        /**
         * @brief create a tessellation evaluation shader object
         *
         * @param[in] source			Pointer to shader source
         * @param[in/out] errorMessage	Pointer to copy the error message
         * @param[in] binary			True if the source is actually a binary program
         *
         * @return The created tessellation evaluation shader object or NULL if the creation failed.
         */
        virtual NVRenderBackendTessEvaluationShaderObject
        CreateTessEvaluationShader(NVConstDataRef<QT3DSI8> source, eastl::string &errorMessage,
                                   bool binary) = 0;

        /**
         * @brief release a tessellation evaluation shader object
         *
         * @param[in] tcso		Pointer to tessellation evaluation shader object
         *
         * @return No Return.
         */
        virtual void
        ReleaseTessEvaluationShader(NVRenderBackendTessEvaluationShaderObject teso) = 0;

        /**
         * @brief create a geometry shader object
         *
         * @param[in] source			Pointer to shader source
         * @param[in/out] errorMessage	Pointer to copy the error message
         * @param[in] binary			True if the source is actually a binary program
         *
         * @return The created geometry shader object or NULL if the creation failed.
         */
        virtual NVRenderBackendGeometryShaderObject
        CreateGeometryShader(NVConstDataRef<QT3DSI8> source, eastl::string &errorMessage,
                             bool binary) = 0;

        /**
         * @brief release a geometry shader object
         *
         * @param[in] tcso		Pointer to geometry shader object
         *
         * @return No Return.
         */
        virtual void ReleaseGeometryShader(NVRenderBackendGeometryShaderObject gso) = 0;

        /**
         * @brief create a compute shader object
         *
         * @param[in] source			Pointer to shader source
         * @param[in/out] errorMessage	Pointer to copy the error message
         * @param[in] binary			True if the source is actually a binary program
         *
         * @return The created compute shader object or NULL if the creation failed.
         */
        virtual NVRenderBackendComputeShaderObject CreateComputeShader(NVConstDataRef<QT3DSI8> source,
                                                                       eastl::string &errorMessage,
                                                                       bool binary) = 0;

        /**
         * @brief release a compute shader object
         *
         * @param[in] cso		Pointer to compute shader object
         *
         * @return No Return.
         */
        virtual void ReleaseComputeShader(NVRenderBackendComputeShaderObject cso) = 0;

        /**
         * @brief attach a vertex shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] vso		Pointer to vertex shader object
         *
         * @return No Return.
         */
        virtual void AttachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendVertexShaderObject vso) = 0;

        /**
         * @brief detach a vertex shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] vso		Pointer to vertex shader object
         *
         * @return No Return.
         */
        virtual void DetachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendVertexShaderObject vso) = 0;

        /**
         * @brief attach a fragment shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] fso		Pointer to fragment shader object
         *
         * @return No Return.
         */
        virtual void AttachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendFragmentShaderObject fso) = 0;

        /**
         * @brief detach a fragment shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] fso		Pointer to fragment shader object
         *
         * @return No Return.
         */
        virtual void DetachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendFragmentShaderObject fso) = 0;

        /**
         * @brief attach a tessellation control shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] tcso		Pointer to tessellation control shader object
         *
         * @return No Return.
         */
        virtual void AttachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendTessControlShaderObject tcso) = 0;

        /**
         * @brief detach a tessellation control shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] tcso		Pointer to tessellation control shader object
         *
         * @return No Return.
         */
        virtual void DetachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendTessControlShaderObject tcso) = 0;

        /**
         * @brief attach a tessellation evaluation shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] teso		Pointer to tessellation evaluation shader object
         *
         * @return No Return.
         */
        virtual void AttachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendTessEvaluationShaderObject teso) = 0;

        /**
         * @brief detach a tessellation evaluation shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] teso		Pointer to tessellation evaluation shader object
         *
         * @return No Return.
         */
        virtual void DetachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendTessEvaluationShaderObject teso) = 0;

        /**
         * @brief attach a geometry shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] teso		Pointer to geometry shader object
         *
         * @return No Return.
         */
        virtual void AttachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendGeometryShaderObject gso) = 0;

        /**
         * @brief detach a geometry shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] teso		Pointer to geometry shader object
         *
         * @return No Return.
         */
        virtual void DetachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendGeometryShaderObject gso) = 0;

        /**
         * @brief attach a compute shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] cso		Pointer to compute shader object
         *
         * @return No Return.
         */
        virtual void AttachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendComputeShaderObject cso) = 0;

        /**
         * @brief detach a compute shader object to a program object
         *
         * @param[in] po		Pointer to program object
         * @param[in] cso		Pointer to compute shader object
         *
         * @return No Return.
         */
        virtual void DetachShader(NVRenderBackendShaderProgramObject po,
                                  NVRenderBackendComputeShaderObject cso) = 0;

        /**
         * @brief create a shader program object
         *
         * @param[in] isSeparable	Tell the backend that this program is separable
         *
         * @return The created shader program object or NULL if the creation failed.
         */
        virtual NVRenderBackendShaderProgramObject CreateShaderProgram(bool isSeparable) = 0;

        /**
         * @brief release a shader program object
         *
         * @param[in] po		Pointer to shader program object
         *
         * @return No Return.
         */
        virtual void ReleaseShaderProgram(NVRenderBackendShaderProgramObject po) = 0;

        /**
         * @brief link a shader program object
         *
         * @param[in] po				Pointer to shader program object
         * @param[in/out] errorMessage	Pointer to copy the error message
         *
         * @return True if program is succesful linked.
         */
        virtual bool linkProgram(NVRenderBackendShaderProgramObject po,
                                 eastl::string &errorMessage,
                                 QT3DSU32 binaryFormat, const QByteArray *binary) = 0;

        /**
         * @brief Make a program current
         *
         * @param[in] po				Pointer to shader program object
         *
         * @return No return
         */
        virtual void SetActiveProgram(NVRenderBackendShaderProgramObject po) = 0;

        /**
         * @brief create a program pipeline object
         *
         *
         * @return The created program pipeline object or NULL if the creation failed.
         */
        virtual NVRenderBackendProgramPipeline CreateProgramPipeline() = 0;

        /**
         * @brief release a program pipeline object
         *
         * @param[in] ppo		Pointer to program pipeline object
         *
         * @return No Return.
         */
        virtual void ReleaseProgramPipeline(NVRenderBackendProgramPipeline ppo) = 0;

        /**
         * @brief Make a program pipeline current
         *
         * @param[in] ppo		Pointer to program pipeline object
         *
         * @return No return
         */
        virtual void SetActiveProgramPipeline(NVRenderBackendProgramPipeline ppo) = 0;

        /**
         * @brief Make a program stage active for this pipeline
         *
         * @param[in] ppo		Pointer to program pipeline object
         * @param[in] flags		Shader stage flags to which this po is bound to
         * @param[in] po		Pointer to shader program object
         *
         * @return No return
         */
        virtual void SetProgramStages(NVRenderBackendProgramPipeline ppo,
                                      NVRenderShaderTypeFlags flags,
                                      NVRenderBackendShaderProgramObject po) = 0;

        /**
         * @brief Runs a compute program
         *
         * @param[in] po				Pointer to shader program object
         * @param[in] numGroupsX		The number of work groups to be launched in the X
         * dimension
         * @param[in] numGroupsY		The number of work groups to be launched in the Y
         * dimension
         * @param[in] numGroupsZ		The number of work groups to be launched in the Z
         * dimension
         *
         * @return No return
         */
        virtual void DispatchCompute(NVRenderBackendShaderProgramObject po, QT3DSU32 numGroupsX,
                                     QT3DSU32 numGroupsY, QT3DSU32 numGroupsZ) = 0;

        /**
         * @brief Query constant count for a program object
         *
         * @param[in] po				Pointer to shader program object
         *
         * @return Return active constant count
         */
        virtual QT3DSI32 GetConstantCount(NVRenderBackendShaderProgramObject po) = 0;

        /**
         * @brief Query constant buffer count for a program object
         *
         * @param[in] po				Pointer to shader program object
         *
         * @return Return active constant buffer count
         */
        virtual QT3DSI32 GetConstantBufferCount(NVRenderBackendShaderProgramObject po) = 0;

        /**
         * @brief Query constant information by ID
         *
         * @param[in] po				Pointer to shader program object
         * @param[in] id				Constant ID
         * @param[in] bufSize			Max char for nameBuf
         * @param[out] numElem			Usually one unless for arrays
         * @param[out] type				Constant data type (QT3DSVec4, QT3DSVec3,...)
         * @param[out] binding			Unit binding point for samplers and images
         * @param[out] nameBuf			Name of the constant
         *
         * @return Return current constant location or -1 if not found
         */
        virtual QT3DSI32 GetConstantInfoByID(NVRenderBackendShaderProgramObject po, QT3DSU32 id,
                                          QT3DSU32 bufSize, QT3DSI32 *numElem,
                                          NVRenderShaderDataTypes::Enum *type, QT3DSI32 *binding,
                                          char *nameBuf) = 0;

        /**
         * @brief Query constant buffer information by ID
         *
         * @param[in] po				Pointer to shader program object
         * @param[in] id				Constant buffer ID
         * @param[in] nameBufSize		Size of nameBuf
         * @param[out] paramCount		Count ot parameter contained in the buffer
         * @param[out] bufferSize		Data size of the constant buffer
         * @param[out] length			Actual characters written
         * @param[out] nameBuf			Receives the name of the buffer
         *
         * @return Return current constant buffer location or -1 if not found
         */
        virtual QT3DSI32 GetConstantBufferInfoByID(NVRenderBackendShaderProgramObject po, QT3DSU32 id,
                                                QT3DSU32 nameBufSize, QT3DSI32 *paramCount,
                                                QT3DSI32 *bufferSize, QT3DSI32 *length,
                                                char *nameBuf) = 0;

        /**
         * @brief Query constant buffer param indices
         *
         * @param[in] po				Pointer to shader program object
         * @param[in] id				Constant buffer ID
         * @param[out] indices			Receives the indices of the uniforms within the
         * constant buffer
         *
         * @return no return value
         */
        virtual void GetConstantBufferParamIndices(NVRenderBackendShaderProgramObject po, QT3DSU32 id,
                                                   QT3DSI32 *indices) = 0;

        /**
         * @brief Query constant buffer param info by indices
         *
         * @param[in] po				Pointer to shader program object
         * @param[in] count				Number of indices
         * @param[in] indices			The indices of the uniforms within the constant
         * buffer
         * @param[out] type				Array of param types ( float ,int, ...)
         * @param[out] size				Array of param size
         * @param[out] offset			Array of param offsets within the constant buffer
         *
         * @return no return value
         */
        virtual void GetConstantBufferParamInfoByIndices(NVRenderBackendShaderProgramObject po,
                                                         QT3DSU32 count, QT3DSU32 *indices, QT3DSI32 *type,
                                                         QT3DSI32 *size, QT3DSI32 *offset) = 0;

        /**
         * @brief Bind program constant block
         *
         * @param[in] po				Pointer to shader program object
         * @param[in] blockIndex		Constant block index returned by
         * GetConstantBufferInfoByID
         * @param[in] binding			Block binding location which should be the same as index
         * in ProgramSetConstantBlock
         *
         * @return No return
         */
        virtual void ProgramSetConstantBlock(NVRenderBackendShaderProgramObject po,
                                             QT3DSU32 blockIndex, QT3DSU32 binding) = 0;

        /**
         * @brief Bind constant buffer for usage in the current active shader program
         *
         * @param[in] index				Constant ID
         * @param[in] bo				Pointer to constant buffer object
         *
         * @return No return
         */
        virtual void ProgramSetConstantBuffer(QT3DSU32 index, NVRenderBackendBufferObject bo) = 0;

        /**
         * @brief Query storage buffer count for a program object
         *
         * @param[in] po				Pointer to shader program object
         *
         * @return Return active storage buffer count
         */
        virtual QT3DSI32 GetStorageBufferCount(NVRenderBackendShaderProgramObject po) = 0;

        /**
         * @brief Query storage buffer information by ID
         *
         * @param[in] po				Pointer to shader program object
         * @param[in] id				Storage buffer ID
         * @param[in] nameBufSize		Size of nameBuf
         * @param[out] paramCount		Count of parameter contained in the buffer
         * @param[out] bufferSize		Data size of the constant buffer
         * @param[out] length			Actual characters written
         * @param[out] nameBuf			Receives the name of the buffer
         *
         * @return Return current storage buffer binding or -1 if not found
         */
        virtual QT3DSI32 GetStorageBufferInfoByID(NVRenderBackendShaderProgramObject po, QT3DSU32 id,
                                               QT3DSU32 nameBufSize, QT3DSI32 *paramCount,
                                               QT3DSI32 *bufferSize, QT3DSI32 *length, char *nameBuf) = 0;

        /**
         * @brief Bind a storage buffer for usage in the current active shader program
         *
         * @param[in] index				Constant ID
         * @param[in] bo				Pointer to storage buffer object
         *
         * @return No return
         */
        virtual void ProgramSetStorageBuffer(QT3DSU32 index, NVRenderBackendBufferObject bo) = 0;

        /**
         * @brief Query atomic counter buffer count for a program object
         *
         * @param[in] po				Pointer to shader program object
         *
         * @return Return active atomic buffer count
         */
        virtual QT3DSI32 GetAtomicCounterBufferCount(NVRenderBackendShaderProgramObject po) = 0;

        /**
         * @brief Query atomic counter buffer information by ID
         *
         * @param[in] po				Pointer to shader program object
         * @param[in] id				Storage buffer ID
         * @param[in] nameBufSize		Size of nameBuf
         * @param[out] paramCount		Count of parameter contained in the buffer
         * @param[out] bufferSize		Data size of the constant buffer
         * @param[out] length			Actual characters written
         * @param[out] nameBuf			Receives the name of the buffer
         *
         * @return Return current storage buffer binding or -1 if not found
         */
        virtual QT3DSI32 GetAtomicCounterBufferInfoByID(NVRenderBackendShaderProgramObject po,
                                                     QT3DSU32 id, QT3DSU32 nameBufSize, QT3DSI32 *paramCount,
                                                     QT3DSI32 *bufferSize, QT3DSI32 *length,
                                                     char *nameBuf) = 0;

        /**
         * @brief Bind a atomic counter buffer for usage in the current active shader program
         *
         * @param[in] index				Constant ID
         * @param[in] bo				Pointer to atomic counter buffer object
         *
         * @return No return
         */
        virtual void ProgramSetAtomicCounterBuffer(QT3DSU32 index, NVRenderBackendBufferObject bo) = 0;

        /**
         * @brief Set constant value
         *
         * @param[in] po				Pointer program object
         * @param[in] id				Constant ID
         * @param[in] type				Constant data type (QT3DSVec4, QT3DSVec3,...)
         * @param[in] count				Element count
         * @param[in] value				Pointer to constant value
         * @param[in] transpose			Transpose a matrix
         *
         * @return No return
         */
        virtual void SetConstantValue(NVRenderBackendShaderProgramObject po, QT3DSU32 id,
                                      NVRenderShaderDataTypes::Enum type, QT3DSI32 count,
                                      const void *value, bool transpose = false) = 0;

        /**
         * @brief Draw the current active vertex buffer
         *
         * @param[in] drawMode	Draw mode (Triangles, ....)
         * @param[in] start		Start vertex
         * @param[in] count		Vertex count
         *
         * @return no return.
         */
        virtual void Draw(NVRenderDrawMode::Enum drawMode, QT3DSU32 start, QT3DSU32 count) = 0;

        /**
         * @brief Draw the current active vertex buffer using an indirect buffer
         *		  This means the setup of the draw call is stored in a buffer bound to
         *		  NVRenderBufferBindValues::Draw_Indirect
         *
         * @param[in] drawMode	Draw mode (Triangles, ....)
         * @param[in] indirect	Offset into a indirect drawing setup buffer
         *
         * @return no return.
         */
        virtual void DrawIndirect(NVRenderDrawMode::Enum drawMode, const void *indirect) = 0;

        /**
         * @brief Draw the current active index buffer
         *
         * @param[in] drawMode	Draw mode (Triangles, ....)
         * @param[in] count		Index count
         * @param[in] type		Index type (QT3DSU16, QT3DSU8)
         * @param[in] indices	Pointer to index buffer. In the case of buffer objects
         *						this is an offset into the active index buffer
         *object.
         *
         * @return no return.
         */
        virtual void DrawIndexed(NVRenderDrawMode::Enum drawMode, QT3DSU32 count,
                                 NVRenderComponentTypes::Enum type, const void *indices) = 0;

        /**
         * @brief Draw the current active index buffer using an indirect buffer
          *		  This means the setup of the draw call is stored in a buffer bound to
         *		  NVRenderBufferBindValues::Draw_Indirect
         *
         * @param[in] drawMode	Draw mode (Triangles, ....)
         * @param[in] type		Index type (QT3DSU16, QT3DSU8)
         * @param[in] indices	Offset into a indirect drawing setup buffer
         *
         * @return no return.
         */
        virtual void DrawIndexedIndirect(NVRenderDrawMode::Enum drawMode,
                                         NVRenderComponentTypes::Enum type,
                                         const void *indirect) = 0;

        /**
         * @brief Read a pixel rectangle from render target (from bottom left)
         *
         * @param[in]  rto		Pointer to render target object
         * @param[in]  x		Windows X start coord
         * @param[in]  y		Windows Y start coord
         * @param[in]  width	Read width dim
         * @param[in]  height	Read height dim
         * @param[out] pixels	Returned pixel data
         *
         * @return No return
         */
        virtual void ReadPixel(NVRenderBackendRenderTargetObject rto, QT3DSI32 x, QT3DSI32 y, QT3DSI32 width,
                               QT3DSI32 height, NVRenderReadPixelFormats::Enum inFormat,
                               void *pixels) = 0;

        /**
         * @brief Create a NV path render object
         *
         * @param[in] range		Number of internal objects
         *
         * @return return path object on success or NULL
         */
        virtual NVRenderBackendPathObject CreatePathNVObject(size_t range) = 0;

        /**
         * @brief Relase a NV path render object
         *
         * @param[in] po		Created path object
         * @param[in] range		Number of internal objects
         *
         * @return return path object on success or NULL
         */
        virtual void ReleasePathNVObject(NVRenderBackendPathObject po, size_t range) = 0;

        /**
         * @brief Set the path commands and data.
         *
         * @param[in]  inPathObject		Pointer to NV path object
         * @param[in]  inPathCommands	vector of path commands ( moveTo,... )
         * @param[in]  inPathCoords		vector of path coords
         *
         * @return No return
         */
        virtual void SetPathSpecification(NVRenderBackendPathObject inPathObject,
                                          NVConstDataRef<QT3DSU8> inPathCommands,
                                          NVConstDataRef<QT3DSF32> inPathCoords) = 0;

        /**
         * @brief Get Bounds of the path object
         *
         * @param[in]  inPathObject		Pointer to NV path object
         *
         * @return return bounds
         */
        virtual NVBounds3 GetPathObjectBoundingBox(NVRenderBackendPathObject inPathObject) = 0;
        virtual NVBounds3 GetPathObjectFillBox(NVRenderBackendPathObject inPathObject) = 0;
        virtual NVBounds3 GetPathObjectStrokeBox(NVRenderBackendPathObject inPathObject) = 0;

        /**
         * @brief Set stroke width. Defaults to 0 if unset.
         *
         * @param[in]  inPathObject		Pointer to NV path object
         *
         * @return No return
         */
        virtual void SetStrokeWidth(NVRenderBackendPathObject inPathObject,
                                    QT3DSF32 inStrokeWidth) = 0;

        /**
         * @brief Path transform commands
         *
         * @param[in]  inPathObject		Pointer to NV path object
         *
         * @return No return
         */
        virtual void SetPathProjectionMatrix(const QT3DSMat44 inPathProjection) = 0;
        virtual void SetPathModelViewMatrix(const QT3DSMat44 inPathModelview) = 0;

        /**
         * @brief Path stencil pass operations
         *
         * @param[in]  inPathObject		Pointer to NV path object
         *
         * @return No return
         */
        virtual void StencilStrokePath(NVRenderBackendPathObject inPathObject) = 0;
        virtual void StencilFillPath(NVRenderBackendPathObject inPathObject) = 0;

        /**
         * @brief Does a instanced stencil fill pass
         *
         * @param[in]  po						Base of path objects
         * @param[in]  numPaths					Number path objects
         * @param[in]  type						type ( byte, int,... )
         * @param[in]  charCodes				charachter string
         * @param[in]  fillMode					Fille mode
         * @param[in]  stencilMask				Stencil mask
         * @param[in]  transformType			Transforming glyphs
         * @param[in]  transformValues			Pointer to array of transforms
         *
         * @return No return
         */
        virtual void StencilFillPathInstanced(
            NVRenderBackendPathObject po, size_t numPaths, NVRenderPathFormatType::Enum type,
            const void *charCodes, NVRenderPathFillMode::Enum fillMode, QT3DSU32 stencilMask,
            NVRenderPathTransformType::Enum transformType, const QT3DSF32 *transformValues) = 0;

        /**
         * @brief Does a instanced stencil stroke pass
         *
         * @param[in]  po						Base of path objects
         * @param[in]  numPaths					Number path objects
         * @param[in]  type						type ( byte, int,... )
         * @param[in]  charCodes				charachter string
         * @param[in]  stencilRef				Stencil reference
         * @param[in]  stencilMask				Stencil mask
         * @param[in]  transformType			Transforming glyphs
         * @param[in]  transformValues			Pointer to array of transforms
         *
         * @return No return
         */
        virtual void StencilStrokePathInstancedN(NVRenderBackendPathObject po, size_t numPaths,
                                                 NVRenderPathFormatType::Enum type,
                                                 const void *charCodes, QT3DSI32 stencilRef,
                                                 QT3DSU32 stencilMask,
                                                 NVRenderPathTransformType::Enum transformType,
                                                 const QT3DSF32 *transformValues) = 0;

        /**
         * @brief Does a instanced cover fill pass
         *
         * @param[in]  po						Base of path objects
         * @param[in]  numPaths					Number path objects
         * @param[in]  type						type ( byte, int,... )
         * @param[in]  charCodes				charachter string
         * @param[in]  coverMode				Cover mode
         * @param[in]  transformType			Transforming glyphs
         * @param[in]  transformValues			Pointer to array of transforms
         *
         * @return No return
         */
        virtual void CoverFillPathInstanced(NVRenderBackendPathObject po, size_t numPaths,
                                            NVRenderPathFormatType::Enum type,
                                            const void *charCodes,
                                            NVRenderPathCoverMode::Enum coverMode,
                                            NVRenderPathTransformType::Enum transformType,
                                            const QT3DSF32 *transformValues) = 0;

        /**
         * @brief Does a instanced cover stroke pass
         *
         * @param[in]  po						Base of path objects
         * @param[in]  numPaths					Number path objects
         * @param[in]  type						type ( byte, int,... )
         * @param[in]  charCodes				charachter string
         * @param[in]  coverMode				Cover mode
         * @param[in]  transformType			Transforming glyphs
         * @param[in]  transformValues			Pointer to array of transforms
         *
         * @return No return
         */
        virtual void CoverStrokePathInstanced(NVRenderBackendPathObject po, size_t numPaths,
                                              NVRenderPathFormatType::Enum type,
                                              const void *charCodes,
                                              NVRenderPathCoverMode::Enum coverMode,
                                              NVRenderPathTransformType::Enum transformType,
                                              const QT3DSF32 *transformValues) = 0;

        /**
         * @brief Path stencil and depth offset
         *
         * @param[in]  inSlope		slope
         * @param[in]  inBias		bias
         *
         * @return No return
         */
        virtual void SetPathStencilDepthOffset(QT3DSF32 inSlope, QT3DSF32 inBias) = 0;

        /**
         * @brief Path cover function
         *
         * @param[in]  inDepthFunction		depth function
         *
         * @return No return
         */
        virtual void SetPathCoverDepthFunc(NVRenderBoolOp::Enum inDepthFunction) = 0;

        /**
         * @brief Load glyphs
         *
         * @param[in]  po						Base of path objects
         * @param[in]  fontTarget				System font, or application font,...
         * @param[in]  fontName					Name of font ( may include path )
         * @param[in]  fontStyle				Bold or italic
         * @param[in]  numGlyphs				Glyph count
         * @param[in]  type						type ( byte, int,... )
         * @param[in]  charCodes				charachter string
         * @param[in]  handleMissingGlyphs		skip or use
         * @param[in]  pathParameterTemplate	template
         * @param[in]  emScale					scale ( true type scale e.g. 2048 )
         *
         * @return No return
         */
        virtual void LoadPathGlyphs(NVRenderBackendPathObject po,
                                    NVRenderPathFontTarget::Enum fontTarget, const void *fontName,
                                    NVRenderPathFontStyleFlags fontStyle, size_t numGlyphs,
                                    NVRenderPathFormatType::Enum type, const void *charCodes,
                                    NVRenderPathMissingGlyphs::Enum handleMissingGlyphs,
                                    NVRenderBackendPathObject pathParameterTemplate,
                                    QT3DSF32 emScale) = 0;

        /**
         * @brief Load indexed font set
         *
         * @param[in]  po						Base of path objects
         * @param[in]  fontTarget				System font, or application font,...
         * @param[in]  fontName					Name of font ( may include path )
         * @param[in]  fontStyle				Bold or italic
         * @param[in]  firstGlyphIndex			First glyph
         * @param[in]  numGlyphs				Glyph count
         * @param[in]  pathParameterTemplate	template
         * @param[in]  emScale					scale ( true type scale e.g. 2048 )
         *
         * @return return load status
         */
        virtual NVRenderPathReturnValues::Enum
        LoadPathGlyphsIndexed(NVRenderBackendPathObject po, NVRenderPathFontTarget::Enum fontTarget,
                              const void *fontName, NVRenderPathFontStyleFlags fontStyle,
                              QT3DSU32 firstGlyphIndex, size_t numGlyphs,
                              NVRenderBackendPathObject pathParameterTemplate, QT3DSF32 emScale) = 0;

        /**
         * @brief Load indexed font set
         *
         * @param[in]	fontTarget				System font, or application font,...
         * @param[in]	fontName				Name of font ( may include path )
         * @param[in]	fontStyle				Bold or italic
         * @param[in]	pathParameterTemplate	template
         * @param[in]	emScale					scale ( true type scale e.g. 2048 )
         * @param[out]	po						contains glyph count
         *
         * @return returnr base path object
         */
        virtual NVRenderBackendPathObject
        LoadPathGlyphsIndexedRange(NVRenderPathFontTarget::Enum fontTarget, const void *fontName,
                                   NVRenderPathFontStyleFlags fontStyle,
                                   NVRenderBackendPathObject pathParameterTemplate, QT3DSF32 emScale,
                                   QT3DSU32 *count) = 0;

        /**
         * @brief Load font set
         *
         * @param[in]  po						Base of path objects
         * @param[in]  fontTarget				System font, or application font,...
         * @param[in]  fontName					Name of font ( may include path )
         * @param[in]  fontStyle				Bold or italic
         * @param[in]  firstGlyph				First glyph
         * @param[in]  numGlyphs				Glyph count
         * @param[in]  handleMissingGlyphs		skip or use
         * @param[in]  pathParameterTemplate	template
         * @param[in]  emScale					scale ( true type scale e.g. 2048 )
         *
         * @return No return
         */
        virtual void LoadPathGlyphRange(NVRenderBackendPathObject po,
                                        NVRenderPathFontTarget::Enum fontTarget,
                                        const void *fontName, NVRenderPathFontStyleFlags fontStyle,
                                        QT3DSU32 firstGlyph, size_t numGlyphs,
                                        NVRenderPathMissingGlyphs::Enum handleMissingGlyphs,
                                        NVRenderBackendPathObject pathParameterTemplate,
                                        QT3DSF32 emScale) = 0;

        /**
         * @brief Query font metrics
         *
         * @param[in]  po						Base of path objects
         * @param[in]  numPaths					Number path objects
         * @param[in]  metricQueryMask			Qeury bit mask
         * @param[in]  type						type ( byte, int,... )
         * @param[in]  charCodes				charachter string
         * @param[in]  stride					scale ( true type scale e.g. 2048 )
         * @param[out] metrics					Filled with font metric values
         *
         * @return No return
         */
        virtual void GetPathMetrics(NVRenderBackendPathObject po, size_t numPaths,
                                    NVRenderPathGlyphFontMetricFlags metricQueryMask,
                                    NVRenderPathFormatType::Enum type, const void *charCodes,
                                    size_t stride, QT3DSF32 *metrics) = 0;

        /**
         * @brief Query font metrics
         *
         * @param[in]  po						Base of path objects
         * @param[in]  numPaths					Number path objects
         * @param[in]  metricQueryMask			Qeury bit mask
         * @param[in]  stride					scale ( true type scale e.g. 2048 )
         * @param[out] metrics					Filled with font metric values
         *
         * @return No return
         */
        virtual void GetPathMetricsRange(NVRenderBackendPathObject po, size_t numPaths,
                                         NVRenderPathGlyphFontMetricFlags metricQueryMask,
                                         size_t stride, QT3DSF32 *metrics) = 0;

        /**
         * @brief Query path spacing
         *
         * @param[in]  po						Base of path objects
         * @param[in]  numPaths					Number path objects
         * @param[in]  pathListMode				How to compute spacing
         * @param[in]  type						type ( byte, int,... )
         * @param[in]  charCodes				charachter string
         * @param[in]  advanceScale
         * @param[in]  kerningScale
         * @param[in]  transformType
         * @param[out] metrics					Filled with font metric values
         *
         * @return No return
         */
        virtual void GetPathSpacing(NVRenderBackendPathObject po, size_t numPaths,
                                    NVRenderPathListMode::Enum pathListMode,
                                    NVRenderPathFormatType::Enum type, const void *charCodes,
                                    QT3DSF32 advanceScale, QT3DSF32 kerningScale,
                                    NVRenderPathTransformType::Enum transformType,
                                    QT3DSF32 *spacing) = 0;

        virtual QSurfaceFormat format() const = 0;

        virtual void getProgramBinary(NVRenderBackendShaderProgramObject po, QT3DSU32 &outFormat,
                                      QByteArray &outBinary) = 0;

    protected:
        /// struct for what the backend supports
        typedef struct NVRenderBackendSupport
        {
            union {
                struct
                {
                    bool bDXTImagesSupported : 1; ///< compressed images supported
                    bool bAnistropySupported : 1; ///< anistropic filtering supported
                    bool bTextureSwizzleSupported : 1; ///< texture swizzle supported
                    bool bDepthStencilSupported : 1; ///< depth stencil textures are supported
                    bool bFPRenderTargetsSupported : 1; ///< floating point render targets are
                                                        ///supported
                    bool bConstantBufferSupported : 1; ///< Constant (uniform) buffers are supported
                    bool bMsTextureSupported : 1; ///< Multisample textures are esupported
                    bool bFastBlitsSupported : 1; ///< The hardware supports fast memor blits
                    bool bTessellationSupported : 1; ///< Hardware supports tessellation
                    bool bComputeSupported : 1; ///< Hardware supports compute shader
                    bool bGeometrySupported : 1; ///< Hardware supports geometry shader
                    bool bTimerQuerySupported : 1; ///< Hardware supports timer queries
                    bool bProgramInterfaceSupported : 1; ///< API supports program interface queries
                    bool bStorageBufferSupported : 1; ///< Shader storage buffers are supported
                    bool bAtomicCounterBufferSupported : 1; ///< Atomic counter buffers are
                                                            /// supported
                    bool bShaderImageLoadStoreSupported : 1; ///< Shader image load / store
                                                             ///operations are supported
                    bool bProgramPipelineSupported : 1; ///< Driver supports separate programs
                    bool bNVPathRenderingSupported : 1; ///< Driver NV path rendering
                    bool bNVAdvancedBlendSupported : 1; ///< Advanced blend modes supported
                    bool bNVBlendCoherenceSupported : 1; ///< Advanced blend done coherently
                                                         ///supported
                    bool bGPUShader5ExtensionSupported : 1;
                    bool bKHRAdvancedBlendSupported : 1; ///< Advanced blend modes supported
                    bool bKHRBlendCoherenceSupported : 1; ///< Advanced blend done coherently
                    bool bVertexArrayObjectSupported : 1;
                    bool bStandardDerivativesSupported : 1;
                    bool bTextureLodSupported : 1;
                    bool bBinaryProgramsSupported : 1;
                } bits;

                QT3DSU32 u32Values;
            } caps;
        } NVRenderBackendSupportBits;

        NVRenderBackendSupportBits m_backendSupport; ///< holds the backend support bits
    };
}
}

#endif